IMigrator.MigrateAsync(String, CancellationToken) Yöntem

Tanım

Veritabanını belirtilen hedef geçişe veya içinde bulunan en son geçişe IMigrationsAssemblygeçirir.

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

Parametreler

targetMigration
String

Veritabanının geçirilip en son sürüme null geçirilmesi için hedef geçiş.

cancellationToken
CancellationToken

CancellationToken Görevin tamamlanmasını beklerken gözlemlemek için bir.

Döndürülenler

Zaman uyumsuz işlemi temsil eden görev

Öznitelikler

Özel durumlar

Açıklamalar

Daha fazla bilgi ve örnek için bkz. Veritabanı geçişleri .

Şunlara uygulanır