DbMigrationsConfiguration.SetHistoryContextFactory Method (String, Func<DbConnection, String, HistoryContext>)

 

Adds a new factory for creating HistoryContext instances to be used for a given database provider.

Namespace:   System.Data.Entity.Migrations
Assembly:  EntityFramework (in EntityFramework.dll)

public void SetHistoryContextFactory(
	string providerInvariantName,
	Func<DbConnection, string, HistoryContext> factory
)

Parameters

providerInvariantName
Type: System.String

Name of the database provider to set the SQL generator for.

factory
Type: System.Func<DbConnection, String, HistoryContext>

A factory for creating HistoryContext instances for a given DbConnection and String representing the default schema.