C# Class System.Data.Entity.Migrations.DbMigrationsConfiguration

Configuration relating to the use of migrations for a given model. You will typically create a configuration class that derives from DbMigrationsConfiguration{TContext} rather than using this class.
Exibir arquivo Open project: aspnet/EntityFramework6 Class Usage Examples

Private Properties

Property Type Description
DbMigrationsConfiguration System.Collections.Generic
OnSeed void

Public Methods

Method Description
DbMigrationsConfiguration ( ) : System.Collections.Generic

Initializes a new instance of the DbMigrationsConfiguration class.

GetHistoryContextFactory ( string providerInvariantName ) : Func

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

GetSqlGenerator ( string providerInvariantName ) : System.Data.Entity.Migrations.Sql.MigrationSqlGenerator

Gets the SQL generator that is set to be used with a given database provider.

SetHistoryContextFactory ( string providerInvariantName, Func factory ) : void

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

SetSqlGenerator ( string providerInvariantName, System.Data.Entity.Migrations.Sql.MigrationSqlGenerator migrationSqlGenerator ) : void

Adds a new SQL generator to be used for a given database provider.

Private Methods

Method Description
DbMigrationsConfiguration ( Lazy resolver ) : System.Collections.Generic
OnSeed ( DbContext context ) : void

Method Details

DbMigrationsConfiguration() public method

Initializes a new instance of the DbMigrationsConfiguration class.
public DbMigrationsConfiguration ( ) : System.Collections.Generic
return System.Collections.Generic

GetHistoryContextFactory() public method

Gets the history context factory that is set to be used with a given database provider.
public GetHistoryContextFactory ( string providerInvariantName ) : Func
providerInvariantName string Name of the database provider to get thefactory for.
return Func

GetSqlGenerator() public method

Gets the SQL generator that is set to be used with a given database provider.
public GetSqlGenerator ( string providerInvariantName ) : System.Data.Entity.Migrations.Sql.MigrationSqlGenerator
providerInvariantName string Name of the database provider to get the SQL generator for.
return System.Data.Entity.Migrations.Sql.MigrationSqlGenerator

SetHistoryContextFactory() public method

Adds a new factory for creating HistoryContext instances to be used for a given database provider.
public SetHistoryContextFactory ( string providerInvariantName, Func factory ) : void
providerInvariantName string Name of the database provider to set the SQL generator for.
factory Func /// A factory for creating instances for a given and /// representing the default schema. ///
return void

SetSqlGenerator() public method

Adds a new SQL generator to be used for a given database provider.
public SetSqlGenerator ( string providerInvariantName, System.Data.Entity.Migrations.Sql.MigrationSqlGenerator migrationSqlGenerator ) : void
providerInvariantName string Name of the database provider to set the SQL generator for.
migrationSqlGenerator System.Data.Entity.Migrations.Sql.MigrationSqlGenerator The SQL generator to be used.
return void