Class ConventionContext<TMetadata>
- Assembly
- Microsoft.EntityFrameworkCore.dll
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
public class ConventionContext<TMetadata> : IConventionContext<TMetadata>, IReadableConventionContext, IConventionContext
Type Parameters
TMetadata
- Inheritance
-
ConventionContext<TMetadata>
- Implements
-
IConventionContext<TMetadata>
- Inherited Members
Constructors
ConventionContext(ConventionDispatcher)
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
public ConventionContext(ConventionDispatcher dispatcher)
Parameters
dispatcher
ConventionDispatcher
Properties
Result
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
public virtual TMetadata? Result { get; }
Property Value
- TMetadata
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.
public virtual 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.
ResetState(TMetadata?)
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
public virtual void ResetState(TMetadata? input)
Parameters
input
TMetadata
ShouldStopProcessing()
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
public virtual bool ShouldStopProcessing()
Returns
StopProcessing()
Calling this will prevent further processing of the associated event by other conventions.
public virtual void StopProcessing()
StopProcessing(TMetadata?)
Calling this will prevent further processing of the associated event by other conventions.
public virtual void StopProcessing(TMetadata? result)
Parameters
result
TMetadataThe new metadata object or null.
Remarks
The common use case is when the metadata object was removed or 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.
public virtual 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.