共用方式為


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 中設定了不同的架構,否則此架構將用於移轉歷程記錄資料表。

屬性

適用於