I use one DataContext for each request, but it depends on the scripts that you encounter. I think the point with L2S was to use it with a single job template, where you have context for ... a zero unit of work. But in large applications this does not work well, since it is rather difficult to re-attach objects to a new context later.
Rick Strahl has a great introduction to this topic:
http://www.west-wind.com/weblog/posts/246222.aspx
One thing that I can say that I had problems with the past is to have one context for both reading and writing scripts. Tracking changes done in the datacontext is pretty overhead when you just read that most web applications usually do most of the time. You can make the datacontext readonly, and this will speed things up quite a bit - but then you need a different context for writing.
asgerhallas Apr 24 '09 at 17:58 2009-04-24 17:58
source share