Table of Contents

Interface IMigrationsAnnotationProvider

Namespace
Microsoft.EntityFrameworkCore.Migrations
Assembly
Microsoft.EntityFrameworkCore.Relational.dll

A service typically implemented by database providers that gives access to annotations used by EF Core Migrations when generating removal operations for various elements of the IRelationalModel. The annotations stored in the relational model are provided by IRelationalAnnotationProvider.

The service lifetime is Singleton. This means a single instance is used by many Microsoft.EntityFrameworkCore.DbContext instances. The implementation must be thread-safe. This service cannot depend on services registered as Scoped.

public interface IMigrationsAnnotationProvider

Methods

ForRemove(ICheckConstraint)

Gets provider-specific Migrations annotations for the given ICheckConstraint when it is being removed.

IEnumerable<IAnnotation> ForRemove(ICheckConstraint checkConstraint)

Parameters

checkConstraint ICheckConstraint

The check constraint.

Returns

IEnumerable<IAnnotation>

The annotations.

ForRemove(IColumn)

Gets provider-specific Migrations annotations for the given IColumn when it is being removed.

IEnumerable<IAnnotation> ForRemove(IColumn column)

Parameters

column IColumn

The column.

Returns

IEnumerable<IAnnotation>

The annotations.

ForRemove(IForeignKeyConstraint)

Gets provider-specific Migrations annotations for the given IForeignKeyConstraint when it is being removed.

IEnumerable<IAnnotation> ForRemove(IForeignKeyConstraint foreignKey)

Parameters

foreignKey IForeignKeyConstraint

The foreign key.

Returns

IEnumerable<IAnnotation>

The annotations.

ForRemove(IRelationalModel)

Gets provider-specific Migrations annotations for the given IRelationalModel when it is being altered.

IEnumerable<IAnnotation> ForRemove(IRelationalModel model)

Parameters

model IRelationalModel

The database model.

Returns

IEnumerable<IAnnotation>

The annotations.

ForRemove(ISequence)

Gets provider-specific Migrations annotations for the given ISequence when it is being removed.

IEnumerable<IAnnotation> ForRemove(ISequence sequence)

Parameters

sequence ISequence

The sequence.

Returns

IEnumerable<IAnnotation>

The annotations.

ForRemove(ITable)

Gets provider-specific Migrations annotations for the given ITable when it is being removed.

IEnumerable<IAnnotation> ForRemove(ITable table)

Parameters

table ITable

The table.

Returns

IEnumerable<IAnnotation>

The annotations.

ForRemove(ITableIndex)

Gets provider-specific Migrations annotations for the given ITableIndex when it is being removed.

IEnumerable<IAnnotation> ForRemove(ITableIndex index)

Parameters

index ITableIndex

The index.

Returns

IEnumerable<IAnnotation>

The annotations.

ForRemove(IUniqueConstraint)

Gets provider-specific Migrations annotations for the given IUniqueConstraint when it is being removed.

IEnumerable<IAnnotation> ForRemove(IUniqueConstraint constraint)

Parameters

constraint IUniqueConstraint

The unique constraint.

Returns

IEnumerable<IAnnotation>

The annotations.

ForRemove(IView)

Gets provider-specific annotations for the given IView when it is being removed.

IEnumerable<IAnnotation> ForRemove(IView view)

Parameters

view IView

The view.

Returns

IEnumerable<IAnnotation>

The annotations.

ForRemove(IViewColumn)

Gets provider-specific annotations for the given IViewColumn when it is being removed.

IEnumerable<IAnnotation> ForRemove(IViewColumn column)

Parameters

column IViewColumn

The column.

Returns

IEnumerable<IAnnotation>

The annotations.