Partilhar via


IMigrator.Migrate(String) Método

Definição

Migra o banco de dados para uma migração de destino especificada ou até a migração mais recente que existe no IMigrationsAssembly.

public void Migrate (string targetMigration = default);
public void Migrate (string? targetMigration = default);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Migration generation currently isn't compatible with trimming")]
public void Migrate (string? targetMigration = default);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Migration generation currently isn't compatible with trimming")]
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Migrations operations are not supported with NativeAOT")]
public void Migrate (string? targetMigration = default);
abstract member Migrate : string -> unit
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Migration generation currently isn't compatible with trimming")>]
abstract member Migrate : string -> unit
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Migration generation currently isn't compatible with trimming")>]
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Migrations operations are not supported with NativeAOT")>]
abstract member Migrate : string -> unit
Public Sub Migrate (Optional targetMigration As String = Nothing)

Parâmetros

targetMigration
String

A migração de destino para a qual migrar o banco de dados ou null migrar para o mais recente.

Atributos

Comentários

Consulte Migrações de banco de dados para obter mais informações e exemplos.

Aplica-se a