Export (0) Print
Expand All
0 out of 4 rated this helpful - Rate this topic

DbMigrationsConfiguration<TContext> Class

Entity Framework 5.0

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

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<TContext> : DbMigrationsConfiguration 
where TContext : DbContext

Type Parameters

TContext

The context.

The DbMigrationsConfiguration<TContext> type exposes the following members.

  NameDescription
Public methodDbMigrationsConfiguration<TContext> Initializes a new instance of the DbMigrationsConfiguration<TContext> 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. (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.)
Top
  NameDescription
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().)
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.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.