RelationalDatabaseFacadeExtensions.GetPendingMigrationsAsync Método

Definição

Obtém de forma assíncrona todas as migrações definidas no assembly, mas que não foram aplicadas ao banco de dados de destino.

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))

Parâmetros

databaseFacade
DatabaseFacade

O DatabaseFacade para o contexto.

cancellationToken
CancellationToken

Um CancellationToken a ser observado enquanto aguarda a conclusão da tarefa.

Retornos

Uma tarefa que representa a operação assíncrona.

Atributos

Exceções

Se o padrão CancellationToken for cancelado.

Comentários

Consulte Migrações de banco de dados para obter mais informações e exemplos.

Aplica-se a