Interface IConventionContext
- Namespace
- Microsoft.EntityFrameworkCore.Metadata.Conventions
- Assembly
- Microsoft.EntityFrameworkCore.dll
Contextual information associated with each convention call.
public interface IConventionContext
Remarks
See Model building conventions for more information and examples.
Methods
DelayConventions()
Prevents conventions from being executed immediately when a metadata aspect is modified. All the delayed conventions will be executed after the returned object is disposed.
IConventionBatch DelayConventions()
Returns
- IConventionBatch
An object that should be disposed to execute the delayed conventions.
Remarks
This is useful when performing multiple operations that depend on each other.
StopProcessing()
Calling this will prevent further processing of the associated event by other conventions.
void StopProcessing()
Remarks
The common use case is when the metadata object was removed by the convention.