Skip to main content
All docs
V25.1
  • .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.

    IMultiTenancyApplicationBuilder.WithHostDbContext<TServiceDbContext>(Action<IServiceProvider, DbContextOptionsBuilder>, Boolean) Method

    Configures DbContext used by the application to access the host database containing tenant settings.

    Namespace: DevExpress.ExpressApp.MultiTenancy.EFCore

    Assembly: DevExpress.ExpressApp.MultiTenancy.EFCore.v25.1.dll

    NuGet Package: DevExpress.ExpressApp.MultiTenancy.EFCore

    Declaration

    IMultiTenancyApplicationBuilder WithHostDbContext<TServiceDbContext>(
        Action<IServiceProvider, DbContextOptionsBuilder> configureServiceDbContext,
        bool isMiddleTier = false
    )
        where TServiceDbContext : DbContext

    Parameters

    Name Type Description
    configureServiceDbContext Action<IServiceProvider, DbContextOptionsBuilder>

    A delegate that configures DbContext.

    Optional Parameters

    Name Type Default Description
    isMiddleTier Boolean False

    true if the application uses the Middle Tier Security; otherwise, false.

    Type Parameters

    Name Description
    TServiceDbContext

    The type of DbContext object used to access the host database.

    Returns

    Type Description
    IMultiTenancyApplicationBuilder

    The application builder that processed the action.

    See Also