Class NpgsqlValueGenerationConvention
A convention that configures store value generation as
Inheritance
Namespace: Npgsql.EntityFrameworkCore.PostgreSQL.Metadata.Conventions
Assembly: Npgsql.EntityFrameworkCore.PostgreSQL.dll
Syntax
public class NpgsqlValueGenerationConvention : RelationalValueGenerationConvention
Constructors
| Improve this Doc View SourceNpgsqlValueGenerationConvention(ProviderConventionSetBuilderDependencies, RelationalConventionSetBuilderDependencies)
Creates a new instance of NpgsqlValueGenerationConvention.
Declaration
public NpgsqlValueGenerationConvention(ProviderConventionSetBuilderDependencies dependencies, RelationalConventionSetBuilderDependencies relationalDependencies)
Parameters
Type | Name | Description |
---|---|---|
ProviderConventionSetBuilderDependencies | dependencies | Parameter object containing dependencies for this convention. |
RelationalConventionSetBuilderDependencies | relationalDependencies | Parameter object containing relational dependencies for this convention. |
Methods
| Improve this Doc View SourceGetValueGenerated(IConventionProperty)
Returns the store value generation strategy to set for the given property.
Declaration
protected override ValueGenerated? GetValueGenerated(IConventionProperty property)
Parameters
Type | Name | Description |
---|---|---|
IConventionProperty | property | The property. |
Returns
Type | Description |
---|---|
ValueGenerated? | The store value generation strategy to set for the given property. |
GetValueGenerated(IReadOnlyProperty, in StoreObjectIdentifier)
Returns the store value generation strategy to set for the given property.
Declaration
public static ValueGenerated? GetValueGenerated(IReadOnlyProperty property, in StoreObjectIdentifier storeObject)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyProperty | property | The property. |
StoreObjectIdentifier | storeObject | The identifier of the store object. |
Returns
Type | Description |
---|---|
ValueGenerated? | The store value generation strategy to set for the given property. |
ProcessPropertyAnnotationChanged(IConventionPropertyBuilder, string, IConventionAnnotation?, IConventionAnnotation?, IConventionContext<IConventionAnnotation>)
Called after an annotation is changed on a property.
Declaration
public override void ProcessPropertyAnnotationChanged(IConventionPropertyBuilder propertyBuilder, string name, IConventionAnnotation? annotation, IConventionAnnotation? oldAnnotation, IConventionContext<IConventionAnnotation> context)
Parameters
Type | Name | Description |
---|---|---|
IConventionPropertyBuilder | propertyBuilder | The builder for the property. |
string | name | The annotation name. |
IConventionAnnotation? | annotation | The new annotation. |
IConventionAnnotation? | oldAnnotation | The old annotation. |
IConventionContext<><IConventionAnnotation> | context | Additional information associated with convention execution. |