Partager via


IMigrator.Migrate(String) Méthode

Définition

Migre la base de données vers une migration cible spécifiée ou jusqu’à la dernière migration qui existe dans le 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)

Paramètres

targetMigration
String

Migration cible vers laquelle migrer la base de données ou null vers la dernière version.

Attributs

Remarques

Pour plus d’informations et d’exemples, consultez Migrations de bases de données.

S’applique à