DbMigrationsConfiguration<TContext> Class

Represents the configuration relating to the use of migrations for a given model.


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

public class DbMigrationsConfiguration<TContext> : DbMigrationsConfiguration 
where TContext : DbContext

Type Parameters


The context.

The DbMigrationsConfiguration<TContext> type exposes the following members.

Public methodDbMigrationsConfiguration<TContext> Initializes a new instance of the DbMigrationsConfiguration<TContext> class.

Public propertyAutomaticMigrationDataLossAllowed Gets or sets a value indicating if data loss is acceptable during automatic migration. If set to false an exception will be thrown if data loss may occur as part of an automatic migration. (Inherited from DbMigrationsConfiguration.)
Public propertyAutomaticMigrationsEnabled Gets or sets a value indicating if automatic migrations can be used when migration the database. (Inherited from DbMigrationsConfiguration.)
Public propertyCodeGenerator Gets or sets the code generator to be used when scaffolding migrations. (Inherited from DbMigrationsConfiguration.)
Public propertyCommandTimeoutGets or sets the timeout value used for the individual commands within a migration. A null value indicates that the default value of the underlying provider will be used. (Inherited from DbMigrationsConfiguration.)
Public propertyContextType Gets or sets the derived DbContext representing the model to be migrated. (Inherited from DbMigrationsConfiguration.)
Public propertyMigrationsAssembly Gets or sets the assembly containing code-based migrations. (Inherited from DbMigrationsConfiguration.)
Public propertyMigrationsDirectory Gets or sets the sub-directory that code-based migrations are stored in. (Inherited from DbMigrationsConfiguration.)
Public propertyMigrationsNamespace Gets or sets the namespace used for code-based migrations. (Inherited from DbMigrationsConfiguration.)
Public propertyTargetDatabase Gets or sets a value to override the connection of the database to be migrated. (Inherited from DbMigrationsConfiguration.)

Public methodEqualsReturns a value indicating whether this instance is equal to a specified object. (Overrides Object.Equals(Object).)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCodeGets the data, for a parameter or column, as the specified type. (Overrides Object.GetHashCode().)
Public methodGetSqlGenerator Gets the SQL generator that is set to be used with a given database provider. (Inherited from DbMigrationsConfiguration.)
Public methodGetTypeReturns the runtime type of the current instance.
Protected methodMemberwiseCloneCreates a shallow copy of the current object.
Protected methodSeed Runs after upgrading to the latest migration to allow seed data to be updated.
Public methodSetSqlGenerator Adds a new SQL generator to be used for a given database provider. (Inherited from DbMigrationsConfiguration.)
Public methodToStringReturns a string that represents the current object. (Overrides Object.ToString().)

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.