Class that creates dbContext instances and scopes them either to a thread or a Web context for efficient reuse.