Search Results for

    Interface ICreateDbContext

    Defines the contract for creating instances of DbContext.

    Namespace: Wolfgang.DbContextBuilderCore
    Assembly: Wolfgang.DbContextBuilder-Core.dll
    Syntax
    public interface ICreateDbContext

    Methods

    | Edit this page View Source

    CreateDbContextAsync<TDbContext>(DbContextOptionsBuilder<TDbContext>)

    Creates a new instance of the specified TDbContext type.

    Declaration
    Task<TDbContext> CreateDbContextAsync<TDbContext>(DbContextOptionsBuilder<TDbContext> optionsBuilder) where TDbContext : DbContext
    Parameters
    Type Name Description
    DbContextOptionsBuilder<TDbContext> optionsBuilder

    The options builder used to configure the DbContext.

    Returns
    Type Description
    Task<TDbContext>

    A task that resolves to a new instance of TDbContext.

    Type Parameters
    Name Description
    TDbContext

    The type of DbContext to create.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX