Table of Contents

Interface IKeyAnnotationChangedConvention

Namespace
Microsoft.EntityFrameworkCore.Metadata.Conventions
Assembly
Microsoft.EntityFrameworkCore.dll

Represents an operation that should be performed when an annotation is changed on a key.

public interface IKeyAnnotationChangedConvention : IConvention

Remarks

See Model building conventions for more information and examples.

Methods

ProcessKeyAnnotationChanged(IConventionKeyBuilder, string, IConventionAnnotation?, IConventionAnnotation?, IConventionContext<IConventionAnnotation>)

Called after an annotation is changed on a key.

void ProcessKeyAnnotationChanged(IConventionKeyBuilder keyBuilder, string name, IConventionAnnotation? annotation, IConventionAnnotation? oldAnnotation, IConventionContext<IConventionAnnotation> context)

Parameters

keyBuilder IConventionKeyBuilder

The builder for the key.

name string

The annotation name.

annotation IConventionAnnotation

The new annotation.

oldAnnotation IConventionAnnotation

The old annotation.

context IConventionContext<IConventionAnnotation>

Additional information associated with convention execution.