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
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Entity Framework