IMigrationsAssembly Interface

Definition

A service representing an assembly containing EF Core Migrations.

public interface IMigrationsAssembly
type IMigrationsAssembly = interface
Public Interface IMigrationsAssembly

Remarks

The service lifetime is Scoped. This means that each DbContext instance will use its own instance of this service. The implementation may depend on other services registered with any lifetime. The implementation does not need to be thread-safe.

See Database migrations for more information and examples.

Properties

Assembly

The assembly that contains the migrations, snapshot, etc.

Migrations

A dictionary mapping migration identifiers to the TypeInfo of the class that represents the migration.

ModelSnapshot

The snapshot of the IModel contained in the assembly.

Methods

CreateMigration(TypeInfo, String)

Creates an instance of the migration class.

FindMigrationId(String)

Finds a migration identifier in the assembly with the given a full migration name or just its identifier.

Extension Methods

GetMigrationId(IMigrationsAssembly, String)

Gets a migration identifier in the assembly with the given a full migration name or just its identifier.

Applies to