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
ICheckConstraintThe 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
IColumnThe 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
IForeignKeyConstraintThe 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
IRelationalModelThe 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
ISequenceThe 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
ITableThe 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
ITableIndexThe 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
IUniqueConstraintThe 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
IViewThe 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
IViewColumnThe column.
Returns
- IEnumerable<IAnnotation>
The annotations.