Interface IConventionContext<TMetadata>
- Namespace
- Microsoft.EntityFrameworkCore.Metadata.Conventions
- Assembly
- Microsoft.EntityFrameworkCore.dll
Contextual information associated with each convention call.
public interface IConventionContext<in TMetadata> : IConventionContext
Type Parameters
TMetadata
The type of the metadata object.
- Inherited Members
Remarks
See Model building conventions for more information and examples.
Methods
StopProcessing(TMetadata?)
Calling this will prevent further processing of the associated event by other conventions.
void StopProcessing(TMetadata? result)
Parameters
result
TMetadataThe new metadata object or null.
Remarks
The common use case is when the metadata object was replaced by the convention.
StopProcessingIfChanged(TMetadata?)
Calling this will prevent further processing of the associated event by other conventions if the given objects are different.
void StopProcessingIfChanged(TMetadata? result)
Parameters
result
TMetadataThe new metadata object or null.
Remarks
The common use case is when the metadata object was replaced by the convention.