Skip to main content
All docs
V24.2
.NET 8.0+
  • The page you are viewing does not exist in the .NET Framework 4.6.2+ platform documentation. This link will take you to the parent topic of the current section.

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