Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

MigrateDatabaseToLatestVersion<TContext, TMigrationsConfiguration> Class

 

An implementation of IDatabaseInitializer<TContext> that will use Code First Migrations to update the database to the latest version.

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

System.Object
  System.Data.Entity.MigrateDatabaseToLatestVersion<TContext, TMigrationsConfiguration>

public class MigrateDatabaseToLatestVersion<TContext, TMigrationsConfiguration> : IDatabaseInitializer<TContext>
where TContext : DbContext
where TMigrationsConfiguration : new(), DbMigrationsConfiguration<TContext>

Type Parameters

TContext

The type of the context.

TMigrationsConfiguration

The type of the migrations configuration to use during initialization.

NameDescription
System_CAPS_pubmethodMigrateDatabaseToLatestVersion<TContext, TMigrationsConfiguration>()

Initializes a new instance of the MigrateDatabaseToLatestVersion class that will use the connection information from a context constructed using the default constructor or registered factory if applicable

System_CAPS_pubmethodMigrateDatabaseToLatestVersion<TContext, TMigrationsConfiguration>(Boolean)

Initializes a new instance of the MigrateDatabaseToLatestVersion class specifying whether to use the connection information from the context that triggered initialization to perform the migration.

System_CAPS_pubmethodMigrateDatabaseToLatestVersion<TContext, TMigrationsConfiguration>(Boolean, TMigrationsConfiguration)

Initializes a new instance of the MigrateDatabaseToLatestVersion class specifying whether to use the connection information from the context that triggered initialization to perform the migration. Also allows specifying migrations configuration to use during initialization.

System_CAPS_pubmethodMigrateDatabaseToLatestVersion<TContext, TMigrationsConfiguration>(String)

Initializes a new instance of the MigrateDatabaseToLatestVersion class that will use a specific connection string from the configuration file to connect to the database to perform the migration.

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodInitializeDatabase(TContext)

Initializes the database for the given context.

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

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

Return to top
Show:
© 2015 Microsoft