Is opening too many datacontexts bad?

Posted by ryudice on Stack Overflow See other posts from Stack Overflow or by ryudice
Published on 2010-05-17T23:50:47Z Indexed on 2010/05/18 0:00 UTC
Read the original article Hit count: 270

I've been checking my application with linq 2 sql profiler, and I noticed that it opens a lot of datacontexts, most of them are opened by the linq datasource I used, since my repositories use only the instance stored in Request.Items, is it bad to open too many datacontext? and how can I make my linqdatasource to use the datacontext that I store in Request.Items for the duration of the request? thanks for any help!

© Stack Overflow or respective owner

Related posts about linq-to-sql

Related posts about optimization