次の方法で共有


IMigrator.MigrateAsync(String, CancellationToken) メソッド

定義

指定したターゲット移行または に存在する最新の移行にデータベースを移行します IMigrationsAssembly

public System.Threading.Tasks.Task MigrateAsync (string targetMigration = default, System.Threading.CancellationToken cancellationToken = default);
public System.Threading.Tasks.Task MigrateAsync (string? targetMigration = default, System.Threading.CancellationToken cancellationToken = default);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Migration generation currently isn't compatible with trimming")]
public System.Threading.Tasks.Task MigrateAsync (string? targetMigration = default, System.Threading.CancellationToken cancellationToken = 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 System.Threading.Tasks.Task MigrateAsync (string? targetMigration = default, System.Threading.CancellationToken cancellationToken = default);
abstract member MigrateAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Migration generation currently isn't compatible with trimming")>]
abstract member MigrateAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
[<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 MigrateAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function MigrateAsync (Optional targetMigration As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task

パラメーター

targetMigration
String

データベースを移行するターゲットの移行、または null 最新の移行を行う移行。

cancellationToken
CancellationToken

CancellationTokenタスクの完了を待機している間に観察する 。

戻り値

非同期操作を表すタスク

属性

例外

CancellationToken が取り消されている場合。

注釈

詳細と例については、「 データベースの移行 」を参照してください。

適用対象