Sdílet prostřednictvím


IMigrator.Migrate(String) Metoda

Definice

Migruje databázi na zadanou cílovou migraci nebo až na nejnovější migraci, která existuje v objektu 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)

Parametry

targetMigration
String

Cílová migrace pro migraci databáze nebo null pro migraci na nejnovější verzi.

Atributy

Poznámky

Další informace a příklady najdete v tématu Migrace databází .

Platí pro