One DbContext per web request… why?
NOTE: This answer talks about the Entity Framework’s DbContext, but it is applicable to any sort of Unit of Work implementation, such as LINQ to SQL’s DataContext, and NHibernate’s ISession. Let start by echoing Ian: Having a single DbContext for the whole application is a Bad Idea. The only situation where this makes sense is … Read more