IMigrator.Migrate(String) 方法

定义

将数据库迁移到指定的目标迁移,或迁移到 中 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)

参数

targetMigration
String

要将数据库迁移到的目标迁移,或 null 迁移到最新的目标迁移。

属性

注解

有关详细信息和示例 ,请参阅数据库迁移

适用于