Compartir a través de


RelationalDatabaseFacadeExtensions.GetAppliedMigrationsAsync Método

Definición

Obtiene de forma asincrónica todas las migraciones que se han aplicado a la base de datos de destino.

public static System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<string>> GetAppliedMigrationsAsync (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>> GetAppliedMigrationsAsync (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.Threading.CancellationToken cancellationToken = default);
static member GetAppliedMigrationsAsync : 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 GetAppliedMigrationsAsync : Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade * System.Threading.CancellationToken -> System.Threading.Tasks.Task<seq<string>>
<Extension()>
Public Function GetAppliedMigrationsAsync (databaseFacade As DatabaseFacade, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IEnumerable(Of String))

Parámetros

databaseFacade
DatabaseFacade

DatabaseFacade para el contexto.

cancellationToken
CancellationToken

Que CancellationToken se debe observar mientras se espera a que se complete la tarea.

Devoluciones

Tarea que representa la operación asincrónica.

Atributos

Excepciones

Comentarios

Consulte Migraciones de bases de datos para obtener más información y ejemplos.

Se aplica a