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 |
---|---|
configure |
Action<Xaf |
#Optional Parameters
Name | Type | Default |
---|---|---|
db |
Service |
Scoped |
#Type Parameters
Name |
---|
TDb |
#Returns
Type |
---|
IObject |
See Also