Creates a ASP.NET Context scoped instance of a DbContext. This static method creates a single instance and reuses it whenever this method is called.

This version creates an internal request specific key shared key that is shared by each caller of this method from the current Web request.

public static TDbContext GetWebRequestScopedDbContext<TDbContext>(string connectionStringId)


optional connectionstring id to load context with

See also:

Class DbContextFactory

© West Wind Technologies, 1996-2016 • Updated: 12/12/15
Comment or report problem with topic