DbContextBuilder<TContext>.WithDbContext<TDbContext>(Action<XafApplication, DbContextOptionsBuilder>, ServiceLifetime) Method
Namespace: DevExpress.ExpressApp.ApplicationBuilder
Assembly: DevExpress.ExpressApp.EFCore.v24.2.dll
NuGet Package: DevExpress.ExpressApp.EFCore
Declaration
public IObjectSpaceProviderBuilder<TContext> WithDbContext<TDbContext>(
Action<XafApplication, DbContextOptionsBuilder> configureOptions,
ServiceLifetime dbContextFactoryServiceLifetime = ServiceLifetime.Scoped
)
where TDbContext : DbContext
Parameters
Name | Type |
---|---|
configureOptions | Action<XafApplication, DbContextOptionsBuilder> |
Optional Parameters
Name | Type | Default |
---|---|---|
dbContextFactoryServiceLifetime | ServiceLifetime | Scoped |
Type Parameters
Name |
---|
TDbContext |
Returns
Type |
---|
IObjectSpaceProviderBuilder<TContext> |
See Also