The setup IS ok...
My solution doesn't use a static DbContext. The DbContext (or whatever is needed) is stored in the HttpContext.Current.Items
collection (that is a current HTTP request specific) and the property is equivalent to a method call that would retrieve the context from this collection and instantiate it if needed. This collection was chosen for its safety and for the fact it's easy to reference it pretty much from anywhere (namely from the Application_EndRequest event) so we can dispose it when we're done.
There's a big difference to the post you've linked, because it describes a situation where you use a static field
. That field would obviously be shared between all users and that would be a big problem.