Search Results for

    Class DbContextBuilderSqliteExtensions

    Extension methods that configure DbContextBuilder<T> to use a SQLite in-memory database (plain SQLite, or SQLite with the SQL-Server-compatibility customizations).

    Inheritance
    object
    DbContextBuilderSqliteExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Wolfgang.DbContextBuilderCore
    Assembly: Wolfgang.DbContextBuilder-Core.dll
    Syntax
    public static class DbContextBuilderSqliteExtensions

    Methods

    | Edit this page View Source

    UseSqliteForMsSqlServer<TDbContext>(DbContextBuilder<TDbContext>)

    Configures the builder to use SQLite as the database provider with SQL Server-specific adjustments, such as default value mappings, to better mimic SQL Server behavior for testing or compatibility.

    Declaration
    public static DbContextBuilder<TDbContext> UseSqliteForMsSqlServer<TDbContext>(this DbContextBuilder<TDbContext> builder) where TDbContext : DbContext
    Parameters
    Type Name Description
    DbContextBuilder<TDbContext> builder
    Returns
    Type Description
    DbContextBuilder<TDbContext>

    DbContextBuilder<T>

    Type Parameters
    Name Description
    TDbContext
    Remarks

    Provider selection is last-write-wins — calling UseSqliteForMsSqlServer after a previous UseInMemory, UseSqlite, or UseSqliteForMsSqlServer call overrides the earlier choice.

    | Edit this page View Source

    UseSqlite<TDbContext>(DbContextBuilder<TDbContext>)

    Instructs the builder to use SQLite as the database provider.

    Declaration
    public static DbContextBuilder<TDbContext> UseSqlite<TDbContext>(this DbContextBuilder<TDbContext> builder) where TDbContext : DbContext
    Parameters
    Type Name Description
    DbContextBuilder<TDbContext> builder
    Returns
    Type Description
    DbContextBuilder<TDbContext>

    DbContextBuilder<T>

    Type Parameters
    Name Description
    TDbContext
    Remarks

    Provider selection is last-write-wins — calling UseSqlite after a previous UseInMemory, UseSqlite, or UseSqliteForMsSqlServer call overrides the earlier choice. Choose one provider per builder.

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