Język

SqlServerDbContextOptionsExtensions Klasa

Definicja

SQL Server określonych metod rozszerzenia dla programu DbContextOptionsBuilder.

public static class SqlServerDbContextOptionsExtensions
[System.Runtime.CompilerServices.Nullable(0)]
public static class SqlServerDbContextOptionsExtensions
type SqlServerDbContextOptionsExtensions = class
[<System.Runtime.CompilerServices.Nullable(0)>]
type SqlServerDbContextOptionsExtensions = class
Public Module SqlServerDbContextOptionsExtensions
Dziedziczenie
SqlServerDbContextOptionsExtensions
Atrybuty

Uwagi

Aby uzyskać więcej informacji i przykłady, zobacz Using DbContextOptions and Accessing SQL Server, Azure SQL, Azure Synapse databases with EF Core (Używanie baz danych DbContextOptions i Uzyskiwanie dostępu do SQL Server, Azure SQL, Azure Synapse baz danych za pomocą programu EF Core).

Metody

Nazwisko Opis
ConfigureSqlEngine(DbContextOptionsBuilder, Action<SqlEngineDbContextOptionsBuilder>)

Konfiguruje kontekst tak, aby łączył się z dowolnym z SQL Server, Azure SQL, Azure Synapse baz danych, ale nie ustawiając początkowo żadnych DbConnection lub parametry połączenia.

ConfigureSqlEngine<TContext>(DbContextOptionsBuilder<TContext>, Action<SqlEngineDbContextOptionsBuilder>)

Konfiguruje kontekst tak, aby łączył się z dowolnym z SQL Server, Azure SQL, Azure Synapse baz danych, ale nie ustawiając początkowo żadnych DbConnection lub parametry połączenia.

UseAzureSql(DbContextOptionsBuilder, Action<AzureSqlDbContextOptionsBuilder>)

Konfiguruje kontekst tak, aby łączył się z bazą danych Azure SQL, ale początkowo nie ustawiał żadnej DbConnection lub parametry połączenia.

UseAzureSql(DbContextOptionsBuilder, DbConnection, Action<AzureSqlDbContextOptionsBuilder>)

Konfiguruje kontekst w celu nawiązania połączenia z bazą danych Azure SQL.

UseAzureSql(DbContextOptionsBuilder, DbConnection, Boolean, Action<AzureSqlDbContextOptionsBuilder>)

Konfiguruje kontekst w celu nawiązania połączenia z bazą danych Azure SQL.

UseAzureSql(DbContextOptionsBuilder, String, Action<AzureSqlDbContextOptionsBuilder>)

Konfiguruje kontekst w celu nawiązania połączenia z bazą danych Azure SQL.

UseAzureSql<TContext>(DbContextOptionsBuilder<TContext>, Action<AzureSqlDbContextOptionsBuilder>)

Konfiguruje kontekst tak, aby łączył się z bazą danych Azure SQL, ale początkowo nie ustawiał żadnej DbConnection lub parametry połączenia.

UseAzureSql<TContext>(DbContextOptionsBuilder<TContext>, DbConnection, Action<AzureSqlDbContextOptionsBuilder>)

Konfiguruje kontekst w celu nawiązania połączenia z bazą danych Azure SQL.

UseAzureSql<TContext>(DbContextOptionsBuilder<TContext>, DbConnection, Boolean, Action<AzureSqlDbContextOptionsBuilder>)

Konfiguruje kontekst w celu nawiązania połączenia z bazą danych Azure SQL.

UseAzureSql<TContext>(DbContextOptionsBuilder<TContext>, String, Action<AzureSqlDbContextOptionsBuilder>)

Konfiguruje kontekst w celu nawiązania połączenia z bazą danych Azure SQL.

UseAzureSynapse(DbContextOptionsBuilder, Action<AzureSynapseDbContextOptionsBuilder>)

Konfiguruje kontekst tak, aby łączył się z bazą danych Azure Synapse, ale początkowo nie ustawiał żadnej DbConnection lub parametry połączenia.

UseAzureSynapse(DbContextOptionsBuilder, DbConnection, Action<AzureSynapseDbContextOptionsBuilder>)

Konfiguruje kontekst w celu nawiązania połączenia z bazą danych Azure Synapse.

UseAzureSynapse(DbContextOptionsBuilder, DbConnection, Boolean, Action<AzureSynapseDbContextOptionsBuilder>)

Konfiguruje kontekst w celu nawiązania połączenia z bazą danych Azure Synapse.

UseAzureSynapse(DbContextOptionsBuilder, String, Action<AzureSynapseDbContextOptionsBuilder>)

Konfiguruje kontekst w celu nawiązania połączenia z bazą danych Azure Synapse.

UseAzureSynapse<TContext>(DbContextOptionsBuilder<TContext>, Action<AzureSynapseDbContextOptionsBuilder>)

Konfiguruje kontekst tak, aby łączył się z bazą danych Azure Synapse, ale początkowo nie ustawiał żadnej DbConnection lub parametry połączenia.

UseAzureSynapse<TContext>(DbContextOptionsBuilder<TContext>, DbConnection, Action<AzureSynapseDbContextOptionsBuilder>)

Konfiguruje kontekst w celu nawiązania połączenia z bazą danych Azure Synapse.

UseAzureSynapse<TContext>(DbContextOptionsBuilder<TContext>, DbConnection, Boolean, Action<AzureSynapseDbContextOptionsBuilder>)

Konfiguruje kontekst w celu nawiązania połączenia z bazą danych Azure Synapse.

UseAzureSynapse<TContext>(DbContextOptionsBuilder<TContext>, String, Action<AzureSynapseDbContextOptionsBuilder>)

Konfiguruje kontekst w celu nawiązania połączenia z bazą danych Azure Synapse.

UseSqlServer(DbContextOptionsBuilder, Action<SqlServerDbContextOptionsBuilder>)

Konfiguruje kontekst tak, aby łączył się z bazą danych SQL Server, ale nie ustawiając początkowo żadnej DbConnection lub parametry połączenia.

UseSqlServer(DbContextOptionsBuilder, DbConnection, Action<SqlServerDbContextOptionsBuilder>)

Konfiguruje kontekst w celu nawiązania połączenia z bazą danych SQL Server.

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

Konfiguruje kontekst w celu nawiązania połączenia z bazą danych SQL Server.

UseSqlServer(DbContextOptionsBuilder, String, Action<SqlServerDbContextOptionsBuilder>)

Konfiguruje kontekst w celu nawiązania połączenia z bazą danych SQL Server.

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

Konfiguruje kontekst tak, aby łączył się z bazą danych SQL Server, ale nie ustawiając początkowo żadnej DbConnection lub parametry połączenia.

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

Konfiguruje kontekst w celu nawiązania połączenia z bazą danych SQL Server.

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

Konfiguruje kontekst w celu nawiązania połączenia z bazą danych SQL Server.

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

Konfiguruje kontekst w celu nawiązania połączenia z bazą danych SQL Server.

Dotyczy