語言

SqlEngineDbContextOptionsBuilderBase<TSelf> 類別

定義

Base class for SQL Server, Azure SQL, Azure Synapse, etc. specific builders.

[System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1, 1 })]
public abstract class SqlEngineDbContextOptionsBuilderBase<TSelf> : Microsoft.EntityFrameworkCore.Infrastructure.RelationalDbContextOptionsBuilder<TSelf,Microsoft.EntityFrameworkCore.SqlServer.Infrastructure.Internal.SqlServerOptionsExtension> where TSelf : SqlEngineDbContextOptionsBuilderBase<TSelf>
[<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1, 1 })>]
type SqlEngineDbContextOptionsBuilderBase<'Self (requires 'Self :> SqlEngineDbContextOptionsBuilderBase<'Self>)> = class
    inherit RelationalDbContextOptionsBuilder<'Self, SqlServerOptionsExtension (requires 'Self :> SqlEngineDbContextOptionsBuilderBase<'Self>)>
Public MustInherit Class SqlEngineDbContextOptionsBuilderBase(Of TSelf)
Inherits RelationalDbContextOptionsBuilder(Of TSelf, SqlServerOptionsExtension)

類型參數

TSelf
繼承
RelationalDbContextOptionsBuilder<TSelf,Microsoft.EntityFrameworkCore.SqlServer.Infrastructure.Internal.SqlServerOptionsExtension>
SqlEngineDbContextOptionsBuilderBase<TSelf>
屬性

建構函式

名稱 Description
SqlEngineDbContextOptionsBuilderBase<TSelf>(DbContextOptionsBuilder)

Base class for SQL Server, Azure SQL, Azure Synapse, etc. specific builders.

屬性

名稱 Description
OptionsBuilder

獲得核心選項建構器。

(繼承來源 RelationalDbContextOptionsBuilder<TBuilder,TExtension>)

方法

名稱 Description
CommandTimeout(Nullable<Int32>)

設定等待時間(以秒為單位),然後終止執行指令並產生錯誤。

(繼承來源 RelationalDbContextOptionsBuilder<TBuilder,TExtension>)
ExecutionStrategy(Func<ExecutionStrategyDependencies,IExecutionStrategy>)

配置上下文以使用提供的 IExecutionStrategy。

(繼承來源 RelationalDbContextOptionsBuilder<TBuilder,TExtension>)
MaxBatchSize(Int32)

設定在 期間傳送到資料庫 SaveChanges()的指令中,最多可包含的語句數量。

(繼承來源 RelationalDbContextOptionsBuilder<TBuilder,TExtension>)
MigrationsAssembly(Assembly)

配置此情境下維護遷移的組裝。

(繼承來源 RelationalDbContextOptionsBuilder<TBuilder,TExtension>)
MigrationsAssembly(String)

配置此情境下維護遷移的組裝。

(繼承來源 RelationalDbContextOptionsBuilder<TBuilder,TExtension>)
MigrationsHistoryTable(String, String)

配置用於記錄已應用於資料庫的遷移資料表名稱。

(繼承來源 RelationalDbContextOptionsBuilder<TBuilder,TExtension>)
MinBatchSize(Int32)

配置在 期間傳送至資料庫 SaveChanges()的多語句指令所需的最少語句數。

(繼承來源 RelationalDbContextOptionsBuilder<TBuilder,TExtension>)
TranslateParameterizedCollectionsToConstants()
已淘汰.

配置上下文以將參數化集合轉換為內聯常數。

(繼承來源 RelationalDbContextOptionsBuilder<TBuilder,TExtension>)
TranslateParameterizedCollectionsToParameters()
已淘汰.

設定上下文以將參數化集合轉換成單一陣列類參數。

(繼承來源 RelationalDbContextOptionsBuilder<TBuilder,TExtension>)
UseParameterizedCollectionMode(ParameterTranslationMode)

配置在轉換參數化集合時所使用的模式。

(繼承來源 RelationalDbContextOptionsBuilder<TBuilder,TExtension>)
UseQuerySplittingBehavior(QuerySplittingBehavior)

在查詢中載入相關集合時,設定 使用 的 QuerySplittingBehavior 。

(繼承來源 RelationalDbContextOptionsBuilder<TBuilder,TExtension>)
UseRelationalNulls(Boolean)

在比較空值時,設定上下文使用關聯式資料庫語意。 預設情況下,Entity Framework 會使用 C# 語意來處理 null 值,並產生 SQL 以補償資料庫處理 null 的方式差異。

(繼承來源 RelationalDbContextOptionsBuilder<TBuilder,TExtension>)
WithOption(Func<TExtension,TExtension>)

透過複製儲存設定的擴充功能來設定一個選項。 這確保建商不會修改其他地方已在使用的選項。

(繼承來源 RelationalDbContextOptionsBuilder<TBuilder,TExtension>)

明確介面實作

名稱 Description
IRelationalDbContextOptionsBuilderInfrastructure.OptionsBuilder

獲得核心選項建構器。

(繼承來源 RelationalDbContextOptionsBuilder<TBuilder,TExtension>)

適用於