Search Results for

    Show / Hide Table of Contents

    Class NpgsqlValueGenerationConvention

    A convention that configures store value generation as on properties that are part of the primary key and not part of any foreign keys, were configured to have a database default value or were configured to use a NpgsqlValueGenerationStrategy. It also configures properties as if they were configured as computed columns.

    Inheritance
    object
    NpgsqlValueGenerationConvention
    Namespace: Npgsql.EntityFrameworkCore.PostgreSQL.Metadata.Conventions
    Assembly: Npgsql.EntityFrameworkCore.PostgreSQL.dll
    Syntax
    public class NpgsqlValueGenerationConvention : RelationalValueGenerationConvention

    Constructors

    | Improve this Doc View Source

    NpgsqlValueGenerationConvention(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 Source

    GetValueGenerated(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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    • Improve this Doc
    • View Source
    In This Article
    Back to top © Copyright 2023 The Npgsql Development Team