Delen via


SqlServerDbContextOptionsExtensions Class

Definition

SQL Server specific extension methods for DbContextOptionsBuilder.

public static class SqlServerDbContextOptionsExtensions
type SqlServerDbContextOptionsExtensions = class
Public Module SqlServerDbContextOptionsExtensions
Inheritance
SqlServerDbContextOptionsExtensions

Remarks

See Using DbContextOptions, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.

Methods

UseSqlServer(DbContextOptionsBuilder, Action<SqlServerDbContextOptionsBuilder>)

Configures the context to connect to a Microsoft SQL Server database, but without initially setting any DbConnection or connection string.

UseSqlServer(DbContextOptionsBuilder, DbConnection, Action<SqlServerDbContextOptionsBuilder>)

Configures the context to connect to a Microsoft SQL Server database.

UseSqlServer(DbContextOptionsBuilder, DbConnection, Boolean, Action<SqlServerDbContextOptionsBuilder>)

Configures the context to connect to a Microsoft SQL Server database.

UseSqlServer(DbContextOptionsBuilder, String, Action<SqlServerDbContextOptionsBuilder>)

Configures the context to connect to a Microsoft SQL Server database.

UseSqlServer<TContext>(DbContextOptionsBuilder<TContext>, Action<SqlServerDbContextOptionsBuilder>)

Configures the context to connect to a Microsoft SQL Server database, but without initially setting any DbConnection or connection string.

UseSqlServer<TContext>(DbContextOptionsBuilder<TContext>, DbConnection, Action<SqlServerDbContextOptionsBuilder>)

Configures the context to connect to a Microsoft SQL Server database.

UseSqlServer<TContext>(DbContextOptionsBuilder<TContext>, DbConnection, Boolean, Action<SqlServerDbContextOptionsBuilder>)

Configures the context to connect to a Microsoft SQL Server database.

UseSqlServer<TContext>(DbContextOptionsBuilder<TContext>, String, Action<SqlServerDbContextOptionsBuilder>)

Configures the context to connect to a Microsoft SQL Server database.

Applies to