readonly IServiceScopeFactory scopeFactory
The IServiceScopeFactory for the DatabaseContextFactory.
async ValueTask UseContext(Func< IDatabaseContext, ValueTask > operation)
Run an operation in the scope of an IDatabaseContext.A ValueTask representing the running operation ...
async ValueTask UseContextTaskReturn(Func< IDatabaseContext, Task > operation)
Run an operation in the scope of an IDatabaseContext.A ValueTask representing the running operation ...
DatabaseContextFactory(IServiceScopeFactory scopeFactory)
Initializes a new instance of the DatabaseContextFactory class.
Factory for scoping usage of IDatabaseContexts. Meant for use by Components.