RelationalDatabaseFacadeExtensions.GetPendingMigrationsAsync 方法

定义

异步获取程序集中定义但尚未应用于目标数据库的所有迁移。

public static System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<string>> GetPendingMigrationsAsync (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.Threading.CancellationToken cancellationToken = default);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Migrations operations are not supported with NativeAOT Use a migration bundle or an alternate way of executing migration operations.")]
public static System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<string>> GetPendingMigrationsAsync (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.Threading.CancellationToken cancellationToken = default);
static member GetPendingMigrationsAsync : Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade * System.Threading.CancellationToken -> System.Threading.Tasks.Task<seq<string>>
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Migrations operations are not supported with NativeAOT Use a migration bundle or an alternate way of executing migration operations.")>]
static member GetPendingMigrationsAsync : Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade * System.Threading.CancellationToken -> System.Threading.Tasks.Task<seq<string>>
<Extension()>
Public Function GetPendingMigrationsAsync (databaseFacade As DatabaseFacade, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IEnumerable(Of String))

参数

databaseFacade
DatabaseFacade

DatabaseFacade上下文的 。

cancellationToken
CancellationToken

等待 CancellationToken 任务完成时要观察的 。

返回

表示异步操作的任务。

属性

例外

注解

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

适用于