DbMigrationsConfiguration.SetHistoryContextFactory Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a new factory for creating HistoryContext instances to be used for a given database provider.
public void SetHistoryContextFactory (string providerInvariantName, Func<System.Data.Common.DbConnection,string,System.Data.Entity.Migrations.History.HistoryContext> factory);
member this.SetHistoryContextFactory : string * Func<System.Data.Common.DbConnection, string, System.Data.Entity.Migrations.History.HistoryContext> -> unit
Public Sub SetHistoryContextFactory (providerInvariantName As String, factory As Func(Of DbConnection, String, HistoryContext))
Parameters
- providerInvariantName
- String
Name of the database provider to set the SQL generator for.
- factory
- Func<DbConnection,String,HistoryContext>
A factory for creating HistoryContext instances for a given DbConnection and String representing the default schema.
Applies to
Samarbeta med oss på GitHub
Källan för det här innehållet finns på GitHub, där du även kan skapa och granska ärenden och pull-begäranden. Se vår deltagarguide för mer information.
Entity Framework