Share via


RelationalDatabaseFacadeExtensions.GetAppliedMigrationsAsync Method

Definition

Asynchronously gets all migrations that have been applied to the target database.

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

Parameters

databaseFacade
DatabaseFacade

The DatabaseFacade for the context.

cancellationToken
CancellationToken

A CancellationToken to observe while waiting for the task to complete.

Returns

A task that represents the asynchronous operation.

Attributes

Exceptions

Remarks

See Database migrations for more information and examples.

Applies to