Search Results for

    Show / Hide Table of Contents

    Class NpgsqlPropertyExtensions

    Property extension methods for Npgsql-specific metadata.

    Inheritance
    object
    NpgsqlPropertyExtensions
    Namespace: Microsoft.EntityFrameworkCore
    Assembly: Npgsql.EntityFrameworkCore.PostgreSQL.dll
    Syntax
    public static class NpgsqlPropertyExtensions
    Remarks

    See Modeling entity types and relationships.

    Methods

    | Improve this Doc View Source

    FindHiLoSequence(IProperty, in StoreObjectIdentifier)

    Finds the in the model to use for the hi-lo pattern.

    Declaration
    public static ISequence? FindHiLoSequence(this IProperty property, in StoreObjectIdentifier storeObject)
    Parameters
    Type Name Description
    IProperty property

    The property.

    StoreObjectIdentifier storeObject

    The identifier of the store object.

    Returns
    Type Description
    ISequence?

    The sequence to use, or null if no sequence exists in the model.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    FindHiLoSequence(IProperty)

    Finds the in the model to use for the hi-lo pattern.

    Declaration
    public static ISequence? FindHiLoSequence(this IProperty property)
    Parameters
    Type Name Description
    IProperty property

    The property.

    Returns
    Type Description
    ISequence?

    The sequence to use, or null if no sequence exists in the model.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    FindHiLoSequence(IReadOnlyProperty, in StoreObjectIdentifier)

    Finds the in the model to use for the hi-lo pattern.

    Declaration
    public static IReadOnlySequence? FindHiLoSequence(this IReadOnlyProperty property, in StoreObjectIdentifier storeObject)
    Parameters
    Type Name Description
    IReadOnlyProperty property

    The property.

    StoreObjectIdentifier storeObject

    The identifier of the store object.

    Returns
    Type Description
    IReadOnlySequence?

    The sequence to use, or null if no sequence exists in the model.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    FindHiLoSequence(IReadOnlyProperty)

    Finds the in the model to use for the hi-lo pattern.

    Declaration
    public static IReadOnlySequence? FindHiLoSequence(this IReadOnlyProperty property)
    Parameters
    Type Name Description
    IReadOnlyProperty property

    The property.

    Returns
    Type Description
    IReadOnlySequence?

    The sequence to use, or null if no sequence exists in the model.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    FindSequence(IProperty, in StoreObjectIdentifier)

    Finds the in the model to use for the key value generation pattern.

    Declaration
    public static ISequence? FindSequence(this IProperty property, in StoreObjectIdentifier storeObject)
    Parameters
    Type Name Description
    IProperty property

    The property.

    StoreObjectIdentifier storeObject

    The identifier of the store object.

    Returns
    Type Description
    ISequence?

    The sequence to use, or null if no sequence exists in the model.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    FindSequence(IProperty)

    Finds the in the model to use for the key value generation pattern.

    Declaration
    public static ISequence? FindSequence(this IProperty property)
    Parameters
    Type Name Description
    IProperty property

    The property.

    Returns
    Type Description
    ISequence?

    The sequence to use, or null if no sequence exists in the model.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    FindSequence(IReadOnlyProperty, in StoreObjectIdentifier)

    Finds the in the model to use for the key value generation pattern.

    Declaration
    public static IReadOnlySequence? FindSequence(this IReadOnlyProperty property, in StoreObjectIdentifier storeObject)
    Parameters
    Type Name Description
    IReadOnlyProperty property

    The property.

    StoreObjectIdentifier storeObject

    The identifier of the store object.

    Returns
    Type Description
    IReadOnlySequence?

    The sequence to use, or null if no sequence exists in the model.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    FindSequence(IReadOnlyProperty)

    Finds the in the model to use for the key value generation pattern.

    Declaration
    public static IReadOnlySequence? FindSequence(this IReadOnlyProperty property)
    Parameters
    Type Name Description
    IReadOnlyProperty property

    The property.

    Returns
    Type Description
    IReadOnlySequence?

    The sequence to use, or null if no sequence exists in the model.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetCompressionMethod(IReadOnlyProperty, in StoreObjectIdentifier)

    Returns the compression method to be used, or null if it hasn't been specified.

    Declaration
    public static string? GetCompressionMethod(this IReadOnlyProperty property, in StoreObjectIdentifier storeObject)
    Parameters
    Type Name Description
    IReadOnlyProperty property
    StoreObjectIdentifier storeObject
    Returns
    Type Description
    string?
    Remarks

    This feature was introduced in PostgreSQL 14.

    | Improve this Doc View Source

    GetCompressionMethod(IReadOnlyProperty)

    Returns the compression method to be used, or null if it hasn't been specified.

    Declaration
    public static string? GetCompressionMethod(this IReadOnlyProperty property)
    Parameters
    Type Name Description
    IReadOnlyProperty property
    Returns
    Type Description
    string?
    Remarks

    This feature was introduced in PostgreSQL 14.

    | Improve this Doc View Source

    GetCompressionMethodConfigurationSource(IConventionProperty)

    Returns the for the compression method.

    Declaration
    public static ConfigurationSource? GetCompressionMethodConfigurationSource(this IConventionProperty index)
    Parameters
    Type Name Description
    IConventionProperty index

    The property.

    Returns
    Type Description
    ConfigurationSource?

    The for the compression method.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetDefaultCollation(IReadOnlyProperty)

    Returns the collation to be used for the column - including the PostgreSQL-specific default column collation defined at the model level (see ).

    Declaration
    public static string? GetDefaultCollation(this IReadOnlyProperty property)
    Parameters
    Type Name Description
    IReadOnlyProperty property

    The property.

    Returns
    Type Description
    string?

    The collation for the column this property is mapped to.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetHiLoSequenceName(IReadOnlyProperty, in StoreObjectIdentifier)

    Returns the name to use for the hi-lo sequence.

    Declaration
    public static string? GetHiLoSequenceName(this IReadOnlyProperty property, in StoreObjectIdentifier storeObject)
    Parameters
    Type Name Description
    IReadOnlyProperty property

    The property.

    StoreObjectIdentifier storeObject

    The identifier of the store object.

    Returns
    Type Description
    string?

    The name to use for the hi-lo sequence.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetHiLoSequenceName(IReadOnlyProperty)

    Returns the name to use for the hi-lo sequence.

    Declaration
    public static string? GetHiLoSequenceName(this IReadOnlyProperty property)
    Parameters
    Type Name Description
    IReadOnlyProperty property

    The property.

    Returns
    Type Description
    string?

    The name to use for the hi-lo sequence.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetHiLoSequenceNameConfigurationSource(IConventionProperty)

    Returns the for the hi-lo sequence name.

    Declaration
    public static ConfigurationSource? GetHiLoSequenceNameConfigurationSource(this IConventionProperty property)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    Returns
    Type Description
    ConfigurationSource?

    The for the hi-lo sequence name.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetHiLoSequenceSchema(IReadOnlyProperty, in StoreObjectIdentifier)

    Returns the schema to use for the hi-lo sequence.

    Declaration
    public static string? GetHiLoSequenceSchema(this IReadOnlyProperty property, in StoreObjectIdentifier storeObject)
    Parameters
    Type Name Description
    IReadOnlyProperty property

    The property.

    StoreObjectIdentifier storeObject

    The identifier of the store object.

    Returns
    Type Description
    string?

    The schema to use for the hi-lo sequence.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetHiLoSequenceSchema(IReadOnlyProperty)

    Returns the schema to use for the hi-lo sequence.

    Declaration
    public static string? GetHiLoSequenceSchema(this IReadOnlyProperty property)
    Parameters
    Type Name Description
    IReadOnlyProperty property

    The property.

    Returns
    Type Description
    string?

    The schema to use for the hi-lo sequence.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetHiLoSequenceSchemaConfigurationSource(IConventionProperty)

    Returns the for the hi-lo sequence schema.

    Declaration
    public static ConfigurationSource? GetHiLoSequenceSchemaConfigurationSource(this IConventionProperty property)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    Returns
    Type Description
    ConfigurationSource?

    The for the hi-lo sequence schema.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetIdentityIncrementBy(IReadOnlyProperty)

    Returns the identity increment value.

    Declaration
    public static long? GetIdentityIncrementBy(this IReadOnlyProperty property)
    Parameters
    Type Name Description
    IReadOnlyProperty property

    The property.

    Returns
    Type Description
    long?

    The identity increment value.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetIdentityIncrementByConfigurationSource(IConventionProperty)

    Returns the for the identity increment value.

    Declaration
    public static ConfigurationSource? GetIdentityIncrementByConfigurationSource(this IConventionProperty property)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    Returns
    Type Description
    ConfigurationSource?

    The for the identity increment value.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetIdentityIsCyclic(IReadOnlyProperty)

    Returns whether the identity's sequence is cyclic.

    Declaration
    public static bool? GetIdentityIsCyclic(this IReadOnlyProperty property)
    Parameters
    Type Name Description
    IReadOnlyProperty property

    The property.

    Returns
    Type Description
    bool?

    Whether the identity's sequence is cyclic.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetIdentityIsCyclicConfigurationSource(IConventionProperty)

    Returns the for whether the identity's sequence is cyclic.

    Declaration
    public static ConfigurationSource? GetIdentityIsCyclicConfigurationSource(this IConventionProperty property)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    Returns
    Type Description
    ConfigurationSource?

    The for whether the identity's sequence is cyclic.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetIdentityMaxValue(IReadOnlyProperty)

    Returns the identity maximum value.

    Declaration
    public static long? GetIdentityMaxValue(this IReadOnlyProperty property)
    Parameters
    Type Name Description
    IReadOnlyProperty property

    The property.

    Returns
    Type Description
    long?

    The identity maximum value.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetIdentityMaxValueConfigurationSource(IConventionProperty)

    Returns the for the identity maximum value.

    Declaration
    public static ConfigurationSource? GetIdentityMaxValueConfigurationSource(this IConventionProperty property)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    Returns
    Type Description
    ConfigurationSource?

    The for the identity maximum value.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetIdentityMinValue(IReadOnlyProperty)

    Returns the identity minimum value.

    Declaration
    public static long? GetIdentityMinValue(this IReadOnlyProperty property)
    Parameters
    Type Name Description
    IReadOnlyProperty property

    The property.

    Returns
    Type Description
    long?

    The identity minimum value.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetIdentityMinValueConfigurationSource(IConventionProperty)

    Returns the for the identity minimum value.

    Declaration
    public static ConfigurationSource? GetIdentityMinValueConfigurationSource(this IConventionProperty property)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    Returns
    Type Description
    ConfigurationSource?

    The for the identity minimum value.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetIdentityNumbersToCache(IReadOnlyProperty)

    Returns the number of sequence numbers to be preallocated and stored in memory for faster access. Defaults to 1 (no cache).

    Declaration
    public static long? GetIdentityNumbersToCache(this IReadOnlyProperty property)
    Parameters
    Type Name Description
    IReadOnlyProperty property

    The property.

    Returns
    Type Description
    long?

    The number of sequence numbers to be cached.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetIdentityNumbersToCacheConfigurationSource(IConventionProperty)

    Returns the for the number of sequence numbers to be preallocated and stored in memory for faster access.

    Declaration
    public static ConfigurationSource? GetIdentityNumbersToCacheConfigurationSource(this IConventionProperty property)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    Returns
    Type Description
    ConfigurationSource?

    The for the number of sequence numbers to be preallocated and stored in memory for faster access.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetIdentityStartValue(IReadOnlyProperty)

    Returns the identity start value.

    Declaration
    public static long? GetIdentityStartValue(this IReadOnlyProperty property)
    Parameters
    Type Name Description
    IReadOnlyProperty property

    The property.

    Returns
    Type Description
    long?

    The identity start value.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetIdentityStartValueConfigurationSource(IConventionProperty)

    Returns the for the identity start value.

    Declaration
    public static ConfigurationSource? GetIdentityStartValueConfigurationSource(this IConventionProperty property)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    Returns
    Type Description
    ConfigurationSource?

    The for the identity start value.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetSequenceName(IReadOnlyProperty, in StoreObjectIdentifier)

    Returns the name to use for the key value generation sequence.

    Declaration
    public static string? GetSequenceName(this IReadOnlyProperty property, in StoreObjectIdentifier storeObject)
    Parameters
    Type Name Description
    IReadOnlyProperty property

    The property.

    StoreObjectIdentifier storeObject

    The identifier of the store object.

    Returns
    Type Description
    string?

    The name to use for the key value generation sequence.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetSequenceName(IReadOnlyProperty)

    Returns the name to use for the key value generation sequence.

    Declaration
    public static string? GetSequenceName(this IReadOnlyProperty property)
    Parameters
    Type Name Description
    IReadOnlyProperty property

    The property.

    Returns
    Type Description
    string?

    The name to use for the key value generation sequence.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetSequenceNameConfigurationSource(IConventionProperty)

    Returns the for the key value generation sequence name.

    Declaration
    public static ConfigurationSource? GetSequenceNameConfigurationSource(this IConventionProperty property)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    Returns
    Type Description
    ConfigurationSource?

    The for the key value generation sequence name.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetSequenceSchema(IReadOnlyProperty, in StoreObjectIdentifier)

    Returns the schema to use for the key value generation sequence.

    Declaration
    public static string? GetSequenceSchema(this IReadOnlyProperty property, in StoreObjectIdentifier storeObject)
    Parameters
    Type Name Description
    IReadOnlyProperty property

    The property.

    StoreObjectIdentifier storeObject

    The identifier of the store object.

    Returns
    Type Description
    string?

    The schema to use for the key value generation sequence.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetSequenceSchema(IReadOnlyProperty)

    Returns the schema to use for the key value generation sequence.

    Declaration
    public static string? GetSequenceSchema(this IReadOnlyProperty property)
    Parameters
    Type Name Description
    IReadOnlyProperty property

    The property.

    Returns
    Type Description
    string?

    The schema to use for the key value generation sequence.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetSequenceSchemaConfigurationSource(IConventionProperty)

    Returns the for the key value generation sequence schema.

    Declaration
    public static ConfigurationSource? GetSequenceSchemaConfigurationSource(this IConventionProperty property)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    Returns
    Type Description
    ConfigurationSource?

    The for the key value generation sequence schema.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetTsVectorConfig(IReadOnlyProperty)

    Returns the text search configuration for this generated tsvector property, or null if this is not a generated tsvector property.

    Declaration
    public static string? GetTsVectorConfig(this IReadOnlyProperty property)
    Parameters
    Type Name Description
    IReadOnlyProperty property

    The property.

    Returns
    Type Description
    string?

    The text search configuration for this generated tsvector property, or null if this is not a generated tsvector property.

    See https://www.postgresql.org/docs/current/textsearch-controls.html for more information.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetTsVectorConfigConfigurationSource(IConventionProperty)

    Returns the for the text search configuration for the generated tsvector property.

    Declaration
    public static ConfigurationSource? GetTsVectorConfigConfigurationSource(this IConventionProperty property)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    Returns
    Type Description
    ConfigurationSource?

    The configuration source for the text search configuration for the generated tsvector property.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetTsVectorProperties(IReadOnlyProperty)

    Returns the properties included in this generated tsvector property, or null if this is not a generated tsvector property.

    Declaration
    public static IReadOnlyList<string>? GetTsVectorProperties(this IReadOnlyProperty property)
    Parameters
    Type Name Description
    IReadOnlyProperty property

    The property.

    Returns
    Type Description
    IReadOnlyList<><string>?

    The included property names, or null if this is not a Generated tsvector column.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetTsVectorPropertiesConfigurationSource(IConventionProperty)

    Returns the for the properties included in the generated tsvector property.

    Declaration
    public static ConfigurationSource? GetTsVectorPropertiesConfigurationSource(this IConventionProperty property)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    Returns
    Type Description
    ConfigurationSource?

    The configuration source for the properties included in the generated tsvector property.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetValueGenerationStrategy(IReadOnlyProperty, in StoreObjectIdentifier)

    Returns the NpgsqlValueGenerationStrategy to use for the property.

    If no strategy is set for the property, then the strategy to use will be taken from the .

    Declaration
    public static NpgsqlValueGenerationStrategy GetValueGenerationStrategy(this IReadOnlyProperty property, in StoreObjectIdentifier storeObject)
    Parameters
    Type Name Description
    IReadOnlyProperty property

    The property.

    StoreObjectIdentifier storeObject

    The identifier of the store object.

    Returns
    Type Description
    NpgsqlValueGenerationStrategy

    The strategy, or None if none was set.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetValueGenerationStrategy(IReadOnlyProperty)

    Returns the NpgsqlValueGenerationStrategy to use for the property.

    If no strategy is set for the property, then the strategy to use will be taken from the .

    Declaration
    public static NpgsqlValueGenerationStrategy GetValueGenerationStrategy(this IReadOnlyProperty property)
    Parameters
    Type Name Description
    IReadOnlyProperty property
    Returns
    Type Description
    NpgsqlValueGenerationStrategy

    The strategy, or None if none was set.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetValueGenerationStrategy(IReadOnlyRelationalPropertyOverrides)

    Returns the NpgsqlValueGenerationStrategy to use for the property.

    Declaration
    public static NpgsqlValueGenerationStrategy? GetValueGenerationStrategy(this IReadOnlyRelationalPropertyOverrides overrides)
    Parameters
    Type Name Description
    IReadOnlyRelationalPropertyOverrides overrides

    The property overrides.

    Returns
    Type Description
    NpgsqlValueGenerationStrategy?

    The strategy, or None if none was set.

    Remarks

    If no strategy is set for the property, then the strategy to use will be taken from the .

    | Improve this Doc View Source

    GetValueGenerationStrategyConfigurationSource(IConventionProperty, in StoreObjectIdentifier)

    Returns the for the NpgsqlValueGenerationStrategy for a particular table.

    Declaration
    public static ConfigurationSource? GetValueGenerationStrategyConfigurationSource(this IConventionProperty property, in StoreObjectIdentifier storeObject)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    StoreObjectIdentifier storeObject

    The identifier of the table containing the column.

    Returns
    Type Description
    ConfigurationSource?

    The for the NpgsqlValueGenerationStrategy.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetValueGenerationStrategyConfigurationSource(IConventionProperty)

    Returns the for the NpgsqlValueGenerationStrategy.

    Declaration
    public static ConfigurationSource? GetValueGenerationStrategyConfigurationSource(this IConventionProperty property)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    Returns
    Type Description
    ConfigurationSource?

    The for the NpgsqlValueGenerationStrategy.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    GetValueGenerationStrategyConfigurationSource(IConventionRelationalPropertyOverrides)

    Returns the for the NpgsqlValueGenerationStrategy for a particular table.

    Declaration
    public static ConfigurationSource? GetValueGenerationStrategyConfigurationSource(this IConventionRelationalPropertyOverrides overrides)
    Parameters
    Type Name Description
    IConventionRelationalPropertyOverrides overrides

    The property overrides.

    Returns
    Type Description
    ConfigurationSource?

    The for the NpgsqlValueGenerationStrategy.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    IsCompatibleWithValueGeneration(IReadOnlyProperty)

    Returns a value indicating whether the property is compatible with any NpgsqlValueGenerationStrategy.

    Declaration
    public static bool IsCompatibleWithValueGeneration(IReadOnlyProperty property)
    Parameters
    Type Name Description
    IReadOnlyProperty property

    The property.

    Returns
    Type Description
    bool

    true if compatible.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    RemoveHiLoOptions(IConventionProperty)

    Removes all identity sequence annotations from the property.

    Declaration
    public static void RemoveHiLoOptions(this IConventionProperty property)
    Parameters
    Type Name Description
    IConventionProperty property
    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    RemoveHiLoOptions(IMutableProperty)

    Removes all identity sequence annotations from the property.

    Declaration
    public static void RemoveHiLoOptions(this IMutableProperty property)
    Parameters
    Type Name Description
    IMutableProperty property
    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    RemoveIdentityOptions(IConventionProperty)

    Removes identity sequence options from the property.

    Declaration
    public static void RemoveIdentityOptions(this IConventionProperty property)
    Parameters
    Type Name Description
    IConventionProperty property
    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    RemoveIdentityOptions(IMutableProperty)

    Removes identity sequence options from the property.

    Declaration
    public static void RemoveIdentityOptions(this IMutableProperty property)
    Parameters
    Type Name Description
    IMutableProperty property
    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetCompressionMethod(IConventionProperty, string?, bool)

    Sets the compression method to be used, or null if it hasn't been specified.

    Declaration
    public static string? SetCompressionMethod(this IConventionProperty property, string? compressionMethod, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionProperty property
    string? compressionMethod
    bool fromDataAnnotation
    Returns
    Type Description
    string?
    Remarks

    This feature was introduced in PostgreSQL 14.

    | Improve this Doc View Source

    SetCompressionMethod(IMutableProperty, string?)

    Sets the compression method to be used, or null if it hasn't been specified.

    Declaration
    public static void SetCompressionMethod(this IMutableProperty property, string? compressionMethod)
    Parameters
    Type Name Description
    IMutableProperty property
    string? compressionMethod
    Remarks

    This feature was introduced in PostgreSQL 14.

    | Improve this Doc View Source

    SetHiLoSequenceName(IConventionProperty, string?, bool)

    Sets the name to use for the hi-lo sequence.

    Declaration
    public static string? SetHiLoSequenceName(this IConventionProperty property, string? name, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    string? name

    The sequence name to use.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    string?
    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetHiLoSequenceName(IMutableProperty, string?)

    Sets the name to use for the hi-lo sequence.

    Declaration
    public static void SetHiLoSequenceName(this IMutableProperty property, string? name)
    Parameters
    Type Name Description
    IMutableProperty property

    The property.

    string? name

    The sequence name to use.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetHiLoSequenceSchema(IConventionProperty, string?, bool)

    Sets the schema to use for the hi-lo sequence.

    Declaration
    public static string? SetHiLoSequenceSchema(this IConventionProperty property, string? schema, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    string? schema

    The schema to use.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    string?
    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetHiLoSequenceSchema(IMutableProperty, string?)

    Sets the schema to use for the hi-lo sequence.

    Declaration
    public static void SetHiLoSequenceSchema(this IMutableProperty property, string? schema)
    Parameters
    Type Name Description
    IMutableProperty property

    The property.

    string? schema

    The schema to use.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetIdentityIncrementBy(IConventionProperty, long?, bool)

    Sets the identity increment value.

    Declaration
    public static long? SetIdentityIncrementBy(this IConventionProperty property, long? incrementBy, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    long? incrementBy

    The value to set.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    long?
    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetIdentityIncrementBy(IMutableProperty, long?)

    Sets the identity increment value.

    Declaration
    public static void SetIdentityIncrementBy(this IMutableProperty property, long? incrementBy)
    Parameters
    Type Name Description
    IMutableProperty property

    The property.

    long? incrementBy

    The value to set.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetIdentityIsCyclic(IConventionProperty, bool?, bool)

    Sets whether the identity's sequence is cyclic.

    Declaration
    public static bool? SetIdentityIsCyclic(this IConventionProperty property, bool? cyclic, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    bool? cyclic

    The value to set.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    bool?
    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetIdentityIsCyclic(IMutableProperty, bool?)

    Sets whether the identity's sequence is cyclic.

    Declaration
    public static void SetIdentityIsCyclic(this IMutableProperty property, bool? cyclic)
    Parameters
    Type Name Description
    IMutableProperty property

    The property.

    bool? cyclic

    The value to set.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetIdentityMaxValue(IConventionProperty, long?, bool)

    Sets the identity maximum value.

    Declaration
    public static long? SetIdentityMaxValue(this IConventionProperty property, long? maxValue, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    long? maxValue

    The value to set.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    long?
    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetIdentityMaxValue(IMutableProperty, long?)

    Sets the identity maximum value.

    Declaration
    public static void SetIdentityMaxValue(this IMutableProperty property, long? maxValue)
    Parameters
    Type Name Description
    IMutableProperty property

    The property.

    long? maxValue

    The value to set.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetIdentityMinValue(IConventionProperty, long?, bool)

    Sets the identity minimum value.

    Declaration
    public static long? SetIdentityMinValue(this IConventionProperty property, long? minValue, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    long? minValue

    The value to set.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    long?
    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetIdentityMinValue(IMutableProperty, long?)

    Sets the identity minimum value.

    Declaration
    public static void SetIdentityMinValue(this IMutableProperty property, long? minValue)
    Parameters
    Type Name Description
    IMutableProperty property

    The property.

    long? minValue

    The value to set.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetIdentityNumbersToCache(IConventionProperty, long?, bool)

    Sets the number of sequence numbers to be preallocated and stored in memory for faster access.

    Declaration
    public static long? SetIdentityNumbersToCache(this IConventionProperty property, long? numbersToCache, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    long? numbersToCache

    The value to set.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    long?
    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetIdentityNumbersToCache(IMutableProperty, long?)

    Sets the number of sequence numbers to be preallocated and stored in memory for faster access.

    Declaration
    public static void SetIdentityNumbersToCache(this IMutableProperty property, long? numbersToCache)
    Parameters
    Type Name Description
    IMutableProperty property

    The property.

    long? numbersToCache

    The value to set.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetIdentityStartValue(IConventionProperty, long?, bool)

    Sets the identity start value.

    Declaration
    public static long? SetIdentityStartValue(this IConventionProperty property, long? startValue, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    long? startValue

    The value to set.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    long?
    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetIdentityStartValue(IMutableProperty, long?)

    Sets the identity start value.

    Declaration
    public static void SetIdentityStartValue(this IMutableProperty property, long? startValue)
    Parameters
    Type Name Description
    IMutableProperty property

    The property.

    long? startValue

    The value to set.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetSequenceName(IConventionProperty, string?, bool)

    Sets the name to use for the key value generation sequence.

    Declaration
    public static string? SetSequenceName(this IConventionProperty property, string? name, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    string? name

    The sequence name to use.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    string?

    The configured value.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetSequenceName(IMutableProperty, string?)

    Sets the name to use for the key value generation sequence.

    Declaration
    public static void SetSequenceName(this IMutableProperty property, string? name)
    Parameters
    Type Name Description
    IMutableProperty property

    The property.

    string? name

    The sequence name to use.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetSequenceSchema(IConventionProperty, string?, bool)

    Sets the schema to use for the key value generation sequence.

    Declaration
    public static string? SetSequenceSchema(this IConventionProperty property, string? schema, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    string? schema

    The schema to use.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    string?

    The configured value.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetSequenceSchema(IMutableProperty, string?)

    Sets the schema to use for the key value generation sequence.

    Declaration
    public static void SetSequenceSchema(this IMutableProperty property, string? schema)
    Parameters
    Type Name Description
    IMutableProperty property

    The property.

    string? schema

    The schema to use.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetTsVectorConfig(IConventionProperty, string, bool)

    Returns the text search configuration for this generated tsvector property, or null if this is not a generated tsvector property.

    Declaration
    public static string SetTsVectorConfig(this IConventionProperty property, string config, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    string config

    The text search configuration for this generated tsvector property, or null if this is not a generated tsvector property.

    See https://www.postgresql.org/docs/current/textsearch-controls.html for more information.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    string
    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetTsVectorConfig(IMutableProperty, string?)

    Sets the text search configuration for this generated tsvector property, or null if this is not a generated tsvector property.

    Declaration
    public static void SetTsVectorConfig(this IMutableProperty property, string? config)
    Parameters
    Type Name Description
    IMutableProperty property

    The property.

    string? config

    The text search configuration for this generated tsvector property, or null if this is not a generated tsvector property.

    See https://www.postgresql.org/docs/current/textsearch-controls.html for more information.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetTsVectorProperties(IConventionProperty, IReadOnlyList<string>?, bool)

    Sets properties included in this generated tsvector property, or null to make this a regular, non-generated property.

    Declaration
    public static IReadOnlyList<string>? SetTsVectorProperties(this IConventionProperty property, IReadOnlyList<string>? properties, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    IReadOnlyList<><string>? properties

    The included property names.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    IReadOnlyList<><string>?
    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetTsVectorProperties(IMutableProperty, IReadOnlyList<string>?)

    Sets the properties included in this generated tsvector property, or null to make this a regular, non-generated property.

    Declaration
    public static void SetTsVectorProperties(this IMutableProperty property, IReadOnlyList<string>? properties)
    Parameters
    Type Name Description
    IMutableProperty property

    The property.

    IReadOnlyList<><string>? properties

    The included property names.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetValueGenerationStrategy(IConventionProperty, NpgsqlValueGenerationStrategy?, in StoreObjectIdentifier, bool)

    Sets the NpgsqlValueGenerationStrategy to use for the property for a particular table.

    Declaration
    public static NpgsqlValueGenerationStrategy? SetValueGenerationStrategy(this IConventionProperty property, NpgsqlValueGenerationStrategy? value, in StoreObjectIdentifier storeObject, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    NpgsqlValueGenerationStrategy? value

    The strategy to use.

    StoreObjectIdentifier storeObject

    The identifier of the table containing the column.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    NpgsqlValueGenerationStrategy?

    The configured value.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetValueGenerationStrategy(IConventionProperty, NpgsqlValueGenerationStrategy?, bool)

    Sets the NpgsqlValueGenerationStrategy to use for the property.

    Declaration
    public static NpgsqlValueGenerationStrategy? SetValueGenerationStrategy(this IConventionProperty property, NpgsqlValueGenerationStrategy? value, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionProperty property

    The property.

    NpgsqlValueGenerationStrategy? value

    The strategy to use.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    NpgsqlValueGenerationStrategy?
    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetValueGenerationStrategy(IConventionRelationalPropertyOverrides, NpgsqlValueGenerationStrategy?, bool)

    Sets the NpgsqlValueGenerationStrategy to use for the property for a particular table.

    Declaration
    public static NpgsqlValueGenerationStrategy? SetValueGenerationStrategy(this IConventionRelationalPropertyOverrides overrides, NpgsqlValueGenerationStrategy? value, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionRelationalPropertyOverrides overrides

    The property overrides.

    NpgsqlValueGenerationStrategy? value

    The strategy to use.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    NpgsqlValueGenerationStrategy?

    The configured value.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetValueGenerationStrategy(IMutableProperty, NpgsqlValueGenerationStrategy?, in StoreObjectIdentifier)

    Sets the NpgsqlValueGenerationStrategy to use for the property for a particular table.

    Declaration
    public static void SetValueGenerationStrategy(this IMutableProperty property, NpgsqlValueGenerationStrategy? value, in StoreObjectIdentifier storeObject)
    Parameters
    Type Name Description
    IMutableProperty property

    The property.

    NpgsqlValueGenerationStrategy? value

    The strategy to use.

    StoreObjectIdentifier storeObject

    The identifier of the table containing the column.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetValueGenerationStrategy(IMutableProperty, NpgsqlValueGenerationStrategy?)

    Sets the NpgsqlValueGenerationStrategy to use for the property.

    Declaration
    public static void SetValueGenerationStrategy(this IMutableProperty property, NpgsqlValueGenerationStrategy? value)
    Parameters
    Type Name Description
    IMutableProperty property

    The property.

    NpgsqlValueGenerationStrategy? value

    The strategy to use.

    Remarks

    See Modeling entity types and relationships.

    | Improve this Doc View Source

    SetValueGenerationStrategy(IMutableRelationalPropertyOverrides, NpgsqlValueGenerationStrategy?)

    Sets the NpgsqlValueGenerationStrategy to use for the property for a particular table.

    Declaration
    public static void SetValueGenerationStrategy(this IMutableRelationalPropertyOverrides overrides, NpgsqlValueGenerationStrategy? value)
    Parameters
    Type Name Description
    IMutableRelationalPropertyOverrides overrides

    The property overrides.

    NpgsqlValueGenerationStrategy? value

    The strategy to use.

    Remarks

    See Modeling entity types and relationships.

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