RelationalDatabaseFacadeExtensions.GetPendingMigrations Method

Definition

Gets all migrations that are defined in the assembly but haven't been applied to the target database.

C#
public static System.Collections.Generic.IEnumerable<string> GetPendingMigrations (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade);
C#
[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.Collections.Generic.IEnumerable<string> GetPendingMigrations (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade);

Parameters

databaseFacade
DatabaseFacade

The DatabaseFacade for the context.

Returns

The list of migrations.

Attributes

Remarks

See Database migrations for more information and examples.

Applies to

Product Versions
Entity Framework Core 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0