Class NpgsqlStoreGenerationConvention
- Assembly
- Npgsql.EntityFrameworkCore.PostgreSQL.dll
A convention that ensures that properties aren't configured to have a default value, as computed column or using a NpgsqlValueGenerationStrategy at the same time.
public class NpgsqlStoreGenerationConvention : StoreGenerationConvention, IPropertyAnnotationChangedConvention, IModelFinalizingConvention, IConvention- Inheritance
- 
      
      
      NpgsqlStoreGenerationConvention
- Implements
- Inherited Members
Constructors
NpgsqlStoreGenerationConvention(ProviderConventionSetBuilderDependencies, RelationalConventionSetBuilderDependencies)
Creates a new instance of NpgsqlStoreGenerationConvention.
public NpgsqlStoreGenerationConvention(ProviderConventionSetBuilderDependencies dependencies, RelationalConventionSetBuilderDependencies relationalDependencies)Parameters
- dependenciesProviderConventionSetBuilderDependencies
- Parameter object containing dependencies for this convention. 
- relationalDependenciesRelationalConventionSetBuilderDependencies
- Parameter object containing relational dependencies for this convention. 
Methods
ProcessPropertyAnnotationChanged(IConventionPropertyBuilder, string, IConventionAnnotation?, IConventionAnnotation?, IConventionContext<IConventionAnnotation>)
Called after an annotation is changed on a property.
public override void ProcessPropertyAnnotationChanged(IConventionPropertyBuilder propertyBuilder, string name, IConventionAnnotation? annotation, IConventionAnnotation? oldAnnotation, IConventionContext<IConventionAnnotation> context)Parameters
- propertyBuilderIConventionPropertyBuilder
- The builder for the property. 
- namestring
- The annotation name. 
- annotationIConventionAnnotation
- The new annotation. 
- oldAnnotationIConventionAnnotation
- The old annotation. 
- contextIConventionContext<IConventionAnnotation>
- Additional information associated with convention execution. 
Validate(IConventionProperty, in StoreObjectIdentifier)
Throws if there is conflicting store generation configuration for this property.
protected override void Validate(IConventionProperty property, in StoreObjectIdentifier storeObject)Parameters
- propertyIConventionProperty
- The property to check. 
- storeObjectStoreObjectIdentifier
- The identifier of the store object.