I use this code to return a list of object to store them in out-proc session :
Session["Data"] = DataContext.ObjectSet.Select(rec => new { Title = rec.Title , Count = rec.Count });
But as you know , we can not store un-serializable class in a out-proc session, Is there any way to do this ?
Please do not say me to define its class, I am looking for a backdoor in C# or a tricks to do this
Thanks
One easy way is to convert to an array object
You can even convert it to a List oibject and serialize it into your own object
and using
But holding such object in a session… you would probably doing things wrong no? Imagine in a given time you will have 1000 records for that list…