Export (0) Print
Expand All

DbMigrationsConfiguration Class

Entity Framework 5.0

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.

System.Object
  System.Data.Entity.Migrations.DbMigrationsConfiguration
    System.Data.Entity.Migrations.DbMigrationsConfiguration<TContext>

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

public class DbMigrationsConfiguration

The DbMigrationsConfiguration type exposes the following members.

  NameDescription
Public methodDbMigrationsConfiguration Initializes a new instance of the DbMigrationsConfiguration class.
Top

  NameDescription
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.
Public propertyAutomaticMigrationsEnabled Gets or sets a value indicating if automatic migrations can be used when migration the database.
Public propertyCodeGenerator Gets or sets the code generator to be used when scaffolding migrations.
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.
Public propertyContextType Gets or sets the derived DbContext representing the model to be migrated.
Public propertyMigrationsAssembly Gets or sets the assembly containing code-based migrations.
Public propertyMigrationsDirectory Gets or sets the sub-directory that code-based migrations are stored in.
Public propertyMigrationsNamespace Gets or sets the namespace used for code-based migrations.
Public propertyTargetDatabase Gets or sets a value to override the connection of the database to be migrated.
Top

  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetSqlGenerator Gets the SQL generator that is set to be used with a given database provider.
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodSetSqlGenerator Adds a new SQL generator to be used for a given database provider.
Public methodToString (Inherited from Object.)
Top

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