MigrateDatabaseToLatestVersion<TContext,TMigrationsConfiguration> Constructors

Definition

Overloads

MigrateDatabaseToLatestVersion<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

MigrateDatabaseToLatestVersion<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.

MigrateDatabaseToLatestVersion<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.

MigrateDatabaseToLatestVersion<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.

MigrateDatabaseToLatestVersion<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

public MigrateDatabaseToLatestVersion ();
Public Sub New ()

Applies to

MigrateDatabaseToLatestVersion<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.

public MigrateDatabaseToLatestVersion (bool useSuppliedContext);
new System.Data.Entity.MigrateDatabaseToLatestVersion<'Context, 'MigrationsConfiguration (requires 'Context :> System.Data.Entity.DbContext and 'MigrationsConfiguration :> System.Data.Entity.Migrations.DbMigrationsConfiguration<'Context> and 'MigrationsConfiguration : (new : unit -> 'MigrationsConfiguration))> : bool -> System.Data.Entity.MigrateDatabaseToLatestVersion<'Context, 'MigrationsConfiguration (requires 'Context :> System.Data.Entity.DbContext and 'MigrationsConfiguration :> System.Data.Entity.Migrations.DbMigrationsConfiguration<'Context> and 'MigrationsConfiguration : (new : unit -> 'MigrationsConfiguration))>
Public Sub New (useSuppliedContext As Boolean)

Parameters

useSuppliedContext
Boolean

If set to true the initializer is run using the connection information from the context that triggered initialization. Otherwise, the connection information will be taken from a context constructed using the default constructor or registered factory if applicable.

Applies to

MigrateDatabaseToLatestVersion<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.

public MigrateDatabaseToLatestVersion (string connectionStringName);
new System.Data.Entity.MigrateDatabaseToLatestVersion<'Context, 'MigrationsConfiguration (requires 'Context :> System.Data.Entity.DbContext and 'MigrationsConfiguration :> System.Data.Entity.Migrations.DbMigrationsConfiguration<'Context> and 'MigrationsConfiguration : (new : unit -> 'MigrationsConfiguration))> : string -> System.Data.Entity.MigrateDatabaseToLatestVersion<'Context, 'MigrationsConfiguration (requires 'Context :> System.Data.Entity.DbContext and 'MigrationsConfiguration :> System.Data.Entity.Migrations.DbMigrationsConfiguration<'Context> and 'MigrationsConfiguration : (new : unit -> 'MigrationsConfiguration))>
Public Sub New (connectionStringName As String)

Parameters

connectionStringName
String

The name of the connection string to use for migration.

Applies to

MigrateDatabaseToLatestVersion<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.

public MigrateDatabaseToLatestVersion (bool useSuppliedContext, TMigrationsConfiguration configuration);
new System.Data.Entity.MigrateDatabaseToLatestVersion<'Context, 'MigrationsConfiguration (requires 'Context :> System.Data.Entity.DbContext and 'MigrationsConfiguration :> System.Data.Entity.Migrations.DbMigrationsConfiguration<'Context> and 'MigrationsConfiguration : (new : unit -> 'MigrationsConfiguration))> : bool * 'MigrationsConfiguration -> System.Data.Entity.MigrateDatabaseToLatestVersion<'Context, 'MigrationsConfiguration (requires 'Context :> System.Data.Entity.DbContext and 'MigrationsConfiguration :> System.Data.Entity.Migrations.DbMigrationsConfiguration<'Context> and 'MigrationsConfiguration : (new : unit -> 'MigrationsConfiguration))>
Public Sub New (useSuppliedContext As Boolean, configuration As TMigrationsConfiguration)

Parameters

useSuppliedContext
Boolean

If set to true the initializer is run using the connection information from the context that triggered initialization. Otherwise, the connection information will be taken from a context constructed using the default constructor or registered factory if applicable.

configuration
TMigrationsConfiguration

Migrations configuration to use during initialization.

Applies to