Using LinqToSQLEntityBase in web application

May 1, 2008 at 9:39 PM
Thank you very much for this great class. Iam using the LINQEntityBase in a web application changing entities stored in session and everything seems to be working fine so far. Are there any known limitation using this class in web applications? I still wonder why a functionality such like this is not already a LinQ default functionality.
May 4, 2008 at 5:16 AM


stn_ wrote:
Thank you very much for this great class. Iam using the LINQEntityBase in a web application changing entities stored in session and everything seems to be working fine so far. Are there any known limitation using this class in web applications? I still wonder why a functionality such like this is not already a LinQ default functionality.


Hi there,

I actually designed the class to primarily support ASP.NET and WCF in business application scenarios. There are not really any issues using it within ASP.NET, however if you want to put the object in the viewstate or in an out of process session cache between requests, you'll need to manually serialize it (see my demo - where it serializes to a string and deserializes it back again).

The main issue with the original implementation by microsoft is that there's not change tracking when the data context is not around - and this certainly is the case if you want to keep modified data around between web requests or you are working in an n-Tier type environment.

Cheers

Matt.