DbMigrationsConfiguration.GetHistoryContextFactory Method

[This page is specific to the Entity Framework version 6. The latest version is available as the 'Entity Framework' NuGet package. For more information about Entity Framework, see msdn.com/data/ef.]

Gets the history context factory that is set to be used with a given database provider.

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

Syntax

'Declaration
Public Function GetHistoryContextFactory ( _
    providerInvariantName As String _
) As Func(Of DbConnection, String, HistoryContext)
'Usage
Dim instance As DbMigrationsConfiguration 
Dim providerInvariantName As String 
Dim returnValue As Func(Of DbConnection, String, HistoryContext)

returnValue = instance.GetHistoryContextFactory(providerInvariantName)
public Func<DbConnection, string, HistoryContext> GetHistoryContextFactory(
    string providerInvariantName
)
public:
Func<DbConnection^, String^, HistoryContext^>^ GetHistoryContextFactory(
    String^ providerInvariantName
)
member GetHistoryContextFactory : 
        providerInvariantName:string -> Func<DbConnection, string, HistoryContext> 
public function GetHistoryContextFactory(
    providerInvariantName : String
) : Func<DbConnection, String, HistoryContext>

Parameters

  • providerInvariantName
    Type: System.String
    Name of the database provider to get thefactory for.

Return Value

Type: System.Func<DbConnection, String, HistoryContext>
The history context factory that is set for the database provider.

See Also

Reference

DbMigrationsConfiguration Class

System.Data.Entity.Migrations Namespace