StoreGenerationConvention Class

Definition

A convention that ensures that properties aren't configured to have a default value and as computed column at the same time.

C#
public class StoreGenerationConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAnnotationChangedConvention
C#
public class StoreGenerationConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAnnotationChangedConvention
Inheritance
StoreGenerationConvention
Derived
Implements

Remarks

See Model building conventions and EF Core value generation for more information and examples.

Constructors

Properties

Dependencies

Dependencies for this service.

RelationalDependencies

Relational provider-specific dependencies for this service.

Methods

ProcessModelFinalized(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Called after a model is finalized.

ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Called when a model is being finalized.

ProcessPropertyAnnotationChanged(IConventionPropertyBuilder, String, IConventionAnnotation, IConventionAnnotation, IConventionContext<IConventionAnnotation>)

Called after an annotation is changed on a property.

Validate(IConventionProperty, StoreObjectIdentifier)

Throws if there is conflicting store generation configuration for this property.

Validate(IConventionProperty)

Throws if there is conflicting store generation configuration for this property.

Applies to

Proizvod Verzije
Entity Framework Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0