Interface IConventionBatch
- Namespace
- Microsoft.EntityFrameworkCore.Metadata.Conventions
- Assembly
- Microsoft.EntityFrameworkCore.dll
Represents an object that delays any convention invocations until it is run or disposed.
public interface IConventionBatch : IDisposable
- Inherited Members
- Extension Methods
Remarks
See Model building conventions for more information and examples.
Methods
Run(IConventionForeignKey)
Runs the delayed conventions while tracking changes to the given foreign key.
IConventionForeignKey? Run(IConventionForeignKey foreignKey)
Parameters
foreignKey
IConventionForeignKeyThe foreign key to track.
Returns
- IConventionForeignKey
The new foreign key object if the given one was replaced by a convention.
Track(IConventionForeignKey)
Starts tracking changes to the given foreign key.
IMetadataReference<IConventionForeignKey> Track(IConventionForeignKey foreignKey)
Parameters
foreignKey
IConventionForeignKeyThe foreign key to track.
Returns
- IMetadataReference<IConventionForeignKey>
An object that will contain the reference to the new foreign key instance if the given one was replaced by a convention. Otherwise, returns the original foreign key.