efcore icon indicating copy to clipboard operation
efcore copied to clipboard

register DbContext with AddPooledDbContextFactory with TContextService & TContextImplementation

Open YoussefSell opened this issue 4 years ago • 1 comments

as part of respecting clean code architecture, we intend to separate or code into multiple projects where the Database related configurations are set in the Persistence project. then when we intend to access the DbCotenxt from other projects we use an Interface so that we don't interact directly with the DbContext, AddDbContextPool<TContextService, TContextImplementation>() allow as to achieve this behavior.

now when using libraries for instant HotChocolate they require you (if you want to use DbContext pooling) to register the DbContext with AddPooledDbContextFactory() it will be beneficial to add the possibility to specify a TContextService same as with AddDbContextPool()

YoussefSell avatar Jun 14 '22 21:06 YoussefSell

Duplicate of #24174

ajcvickers avatar Jun 16 '22 17:06 ajcvickers