語言

HistoryContext(DbConnection, String) 建構函式

定義

初始化一個新的 HistoryContext 類別實例。 如果你在建立衍生的歷史上下文,通常會暴露一個承接相同參數的建構子,並將其傳給這個基礎建構器。

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public HistoryContext(System.Data.Common.DbConnection existingConnection, string defaultSchema);
new System.Data.Entity.Migrations.History.HistoryContext : System.Data.Common.DbConnection * string -> System.Data.Entity.Migrations.History.HistoryContext
Public Sub New (existingConnection As DbConnection, defaultSchema As String)

參數

existingConnection
DbConnection

一個既有的連線,用於新的情境。

defaultSchema
String

被遷移模型的預設架構。 除非在 OnModelCreating 中設定不同的架構,否則此架構將用於遷移歷史表。

屬性

適用於