title: One DbContext per request in ASP.NET MVC (without IOC container)
body: <p>Apologies if this has already been answered, but how do you guarantee one Entity Framework DbContext per request if you are not using an IOC container? (The answers I've come across so far deal with IOC container solutions.)</p>
  
  <p>It seems like most solutions hook into the <code>HttpContext.Current.Items</code> dictionary, but how do you guarantee disposal of the DbContext when the request is finished? (Or is disposal not absolutely necessary with an EF <code>DbContext</code>?)</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I'm currently instantiating and disposing my DbContext in my controllers, but I also have several separate instantiations of my DbContext in ActionFilters and my MembershipProvider (and I just noticed, also a couple validators). So, I thought it might be a good idea to centralize instantiation and storage of my DbContext to reduce overhead.</p>