Partager via


RelationalDatabaseFacadeExtensions.GetAppliedMigrationsAsync Méthode

Définition

Obtient de façon asynchrone toutes les migrations qui ont été appliquées à la base de données cible.

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

Paramètres

databaseFacade
DatabaseFacade

DatabaseFacade pour le contexte.

cancellationToken
CancellationToken

CancellationToken à observer en attendant la fin de la tâche.

Retours

Tâche qui représente l’opération asynchrone.

Attributs

Exceptions

Remarques

Pour plus d’informations et d’exemples, consultez Migrations de bases de données.

S’applique à