Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add AddDbContextFactory to allow registering a factory for creating c…
…ontexts Fixes #18575 Mostly this is copied from @JeremyLikness's sample, with tests added. It evolved a bit as I was testing. Most significantly, we now register an IDbContextFactory interface, for which we provide a default implementation. This allows the factory to be replaced by one specific for the application, which can be more performant because it doesn't use ActivatorUtilities. Overloads have been added for this. I believe we can also add overloads to allow the factory to resolve from a context pool, but I will file a new issue for this.
- Loading branch information