Share via


HistoryContext(DbConnection, String) Constructor

Definition

Initializes a new instance of the HistoryContext class. If you are creating a derived history context you will generally expose a constructor that accepts these same parameters and passes them to this base constructor.

[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)

Parameters

existingConnection
DbConnection

An existing connection to use for the new context.

defaultSchema
String

The default schema of the model being migrated. This schema will be used for the migrations history table unless a different schema is configured in OnModelCreating.

Attributes

Applies to