IConventionContext<TMetadata> Interface

Definition

Contextual information associated with each convention call.

public interface IConventionContext<in TMetadata> : Microsoft.EntityFrameworkCore.Metadata.Conventions.IConventionContext
type IConventionContext<'Metadata> = interface
    interface IConventionContext
Public Interface IConventionContext(Of In TMetadata)
Implements IConventionContext

Type Parameters

TMetadata

The type of the metadata object.

This type parameter is contravariant. That is, you can use either the type you specified or any type that is less derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
Implements

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.

(Inherited from IConventionContext)
StopProcessing()

Calling this will prevent further processing of the associated event by other conventions.

(Inherited from IConventionContext)
StopProcessing(TMetadata)

Calling this will prevent further processing of the associated event by other conventions.

StopProcessingIfChanged(TMetadata)

Calling this will prevent further processing of the associated event by other conventions if the given objects are different.

Applies to