Interface IForeignKeyPropertiesChangedConvention
- Namespace
- Microsoft.EntityFrameworkCore.Metadata.Conventions
- Assembly
- Microsoft.EntityFrameworkCore.dll
Represents an operation that should be performed when the foreign key properties or principal key are changed.
public interface IForeignKeyPropertiesChangedConvention : IConvention
Remarks
See Model building conventions for more information and examples.
Methods
ProcessForeignKeyPropertiesChanged(IConventionForeignKeyBuilder, IReadOnlyList<IConventionProperty>, IConventionKey, IConventionContext<IReadOnlyList<IConventionProperty>>)
Called after the foreign key properties or principal key are changed.
void ProcessForeignKeyPropertiesChanged(IConventionForeignKeyBuilder relationshipBuilder, IReadOnlyList<IConventionProperty> oldDependentProperties, IConventionKey oldPrincipalKey, IConventionContext<IReadOnlyList<IConventionProperty>> context)
Parameters
relationshipBuilder
IConventionForeignKeyBuilderThe builder for the foreign key.
oldDependentProperties
IReadOnlyList<IConventionProperty>The old foreign key properties.
oldPrincipalKey
IConventionKeyThe old principal key.
context
IConventionContext<IReadOnlyList<IConventionProperty>>Additional information associated with convention execution.