Class NpgsqlPropertyExtensions
- Namespace
- Microsoft.EntityFrameworkCore
- Assembly
- Npgsql.EntityFrameworkCore.PostgreSQL.dll
Property extension methods for Npgsql-specific metadata.
public static class NpgsqlPropertyExtensions
- Inheritance
-
NpgsqlPropertyExtensions
- Inherited Members
Remarks
Methods
FindHiLoSequence(IProperty)
Finds the ISequence in the model to use for the hi-lo pattern.
public static ISequence? FindHiLoSequence(this IProperty property)
Parameters
propertyIPropertyThe property.
Returns
FindHiLoSequence(IProperty, in StoreObjectIdentifier)
Finds the ISequence in the model to use for the hi-lo pattern.
public static ISequence? FindHiLoSequence(this IProperty property, in StoreObjectIdentifier storeObject)
Parameters
propertyIPropertyThe property.
storeObjectStoreObjectIdentifierThe identifier of the store object.
Returns
FindHiLoSequence(IReadOnlyProperty)
Finds the ISequence in the model to use for the hi-lo pattern.
public static IReadOnlySequence? FindHiLoSequence(this IReadOnlyProperty property)
Parameters
propertyIReadOnlyPropertyThe property.
Returns
- IReadOnlySequence
The sequence to use, or null if no sequence exists in the model.
FindHiLoSequence(IReadOnlyProperty, in StoreObjectIdentifier)
Finds the ISequence in the model to use for the hi-lo pattern.
public static IReadOnlySequence? FindHiLoSequence(this IReadOnlyProperty property, in StoreObjectIdentifier storeObject)
Parameters
propertyIReadOnlyPropertyThe property.
storeObjectStoreObjectIdentifierThe identifier of the store object.
Returns
- IReadOnlySequence
The sequence to use, or null if no sequence exists in the model.
FindSequence(IProperty)
Finds the ISequence in the model to use for the key value generation pattern.
public static ISequence? FindSequence(this IProperty property)
Parameters
propertyIPropertyThe property.
Returns
FindSequence(IProperty, in StoreObjectIdentifier)
Finds the ISequence in the model to use for the key value generation pattern.
public static ISequence? FindSequence(this IProperty property, in StoreObjectIdentifier storeObject)
Parameters
propertyIPropertyThe property.
storeObjectStoreObjectIdentifierThe identifier of the store object.
Returns
FindSequence(IReadOnlyProperty)
Finds the ISequence in the model to use for the key value generation pattern.
public static IReadOnlySequence? FindSequence(this IReadOnlyProperty property)
Parameters
propertyIReadOnlyPropertyThe property.
Returns
- IReadOnlySequence
The sequence to use, or null if no sequence exists in the model.
FindSequence(IReadOnlyProperty, in StoreObjectIdentifier)
Finds the ISequence in the model to use for the key value generation pattern.
public static IReadOnlySequence? FindSequence(this IReadOnlyProperty property, in StoreObjectIdentifier storeObject)
Parameters
propertyIReadOnlyPropertyThe property.
storeObjectStoreObjectIdentifierThe identifier of the store object.
Returns
- IReadOnlySequence
The sequence to use, or null if no sequence exists in the model.
GetCompressionMethod(IReadOnlyProperty)
Returns the compression method to be used, or null if it hasn't been specified.
public static string? GetCompressionMethod(this IReadOnlyProperty property)
Parameters
propertyIReadOnlyProperty
Returns
Remarks
This feature was introduced in PostgreSQL 14.
GetCompressionMethod(IReadOnlyProperty, in StoreObjectIdentifier)
Returns the compression method to be used, or null if it hasn't been specified.
public static string? GetCompressionMethod(this IReadOnlyProperty property, in StoreObjectIdentifier storeObject)
Parameters
propertyIReadOnlyPropertystoreObjectStoreObjectIdentifier
Returns
Remarks
This feature was introduced in PostgreSQL 14.
GetCompressionMethodConfigurationSource(IConventionProperty)
Returns the ConfigurationSource for the compression method.
public static ConfigurationSource? GetCompressionMethodConfigurationSource(this IConventionProperty index)
Parameters
indexIConventionPropertyThe property.
Returns
- ConfigurationSource?
The ConfigurationSource for the compression method.
GetDefaultCollation(IReadOnlyProperty)
Returns the collation to be used for the column - including the PostgreSQL-specific default column collation defined at the model level (see SetDefaultColumnCollation(IMutableModel, string?)).
[Obsolete("Use EF Core's standard model bulk configuration API")]
public static string? GetDefaultCollation(this IReadOnlyProperty property)
Parameters
propertyIReadOnlyPropertyThe property.
Returns
- string
The collation for the column this property is mapped to.
GetHiLoSequenceName(IReadOnlyProperty)
Returns the name to use for the hi-lo sequence.
public static string? GetHiLoSequenceName(this IReadOnlyProperty property)
Parameters
propertyIReadOnlyPropertyThe property.
Returns
- string
The name to use for the hi-lo sequence.
GetHiLoSequenceName(IReadOnlyProperty, in StoreObjectIdentifier)
Returns the name to use for the hi-lo sequence.
public static string? GetHiLoSequenceName(this IReadOnlyProperty property, in StoreObjectIdentifier storeObject)
Parameters
propertyIReadOnlyPropertyThe property.
storeObjectStoreObjectIdentifierThe identifier of the store object.
Returns
- string
The name to use for the hi-lo sequence.
GetHiLoSequenceNameConfigurationSource(IConventionProperty)
Returns the ConfigurationSource for the hi-lo sequence name.
public static ConfigurationSource? GetHiLoSequenceNameConfigurationSource(this IConventionProperty property)
Parameters
propertyIConventionPropertyThe property.
Returns
- ConfigurationSource?
The ConfigurationSource for the hi-lo sequence name.
GetHiLoSequenceSchema(IReadOnlyProperty)
Returns the schema to use for the hi-lo sequence.
public static string? GetHiLoSequenceSchema(this IReadOnlyProperty property)
Parameters
propertyIReadOnlyPropertyThe property.
Returns
- string
The schema to use for the hi-lo sequence.
GetHiLoSequenceSchema(IReadOnlyProperty, in StoreObjectIdentifier)
Returns the schema to use for the hi-lo sequence.
public static string? GetHiLoSequenceSchema(this IReadOnlyProperty property, in StoreObjectIdentifier storeObject)
Parameters
propertyIReadOnlyPropertyThe property.
storeObjectStoreObjectIdentifierThe identifier of the store object.
Returns
- string
The schema to use for the hi-lo sequence.
GetHiLoSequenceSchemaConfigurationSource(IConventionProperty)
Returns the ConfigurationSource for the hi-lo sequence schema.
public static ConfigurationSource? GetHiLoSequenceSchemaConfigurationSource(this IConventionProperty property)
Parameters
propertyIConventionPropertyThe property.
Returns
- ConfigurationSource?
The ConfigurationSource for the hi-lo sequence schema.
GetIdentityIncrementBy(IReadOnlyProperty)
Returns the identity increment value.
public static long? GetIdentityIncrementBy(this IReadOnlyProperty property)
Parameters
propertyIReadOnlyPropertyThe property.
Returns
- long?
The identity increment value.
GetIdentityIncrementByConfigurationSource(IConventionProperty)
Returns the ConfigurationSource for the identity increment value.
public static ConfigurationSource? GetIdentityIncrementByConfigurationSource(this IConventionProperty property)
Parameters
propertyIConventionPropertyThe property.
Returns
- ConfigurationSource?
The ConfigurationSource for the identity increment value.
GetIdentityIsCyclic(IReadOnlyProperty)
Returns whether the identity's sequence is cyclic.
public static bool? GetIdentityIsCyclic(this IReadOnlyProperty property)
Parameters
propertyIReadOnlyPropertyThe property.
Returns
- bool?
Whether the identity's sequence is cyclic.
GetIdentityIsCyclicConfigurationSource(IConventionProperty)
Returns the ConfigurationSource for whether the identity's sequence is cyclic.
public static ConfigurationSource? GetIdentityIsCyclicConfigurationSource(this IConventionProperty property)
Parameters
propertyIConventionPropertyThe property.
Returns
- ConfigurationSource?
The ConfigurationSource for whether the identity's sequence is cyclic.
GetIdentityMaxValue(IReadOnlyProperty)
Returns the identity maximum value.
public static long? GetIdentityMaxValue(this IReadOnlyProperty property)
Parameters
propertyIReadOnlyPropertyThe property.
Returns
- long?
The identity maximum value.
GetIdentityMaxValueConfigurationSource(IConventionProperty)
Returns the ConfigurationSource for the identity maximum value.
public static ConfigurationSource? GetIdentityMaxValueConfigurationSource(this IConventionProperty property)
Parameters
propertyIConventionPropertyThe property.
Returns
- ConfigurationSource?
The ConfigurationSource for the identity maximum value.
GetIdentityMinValue(IReadOnlyProperty)
Returns the identity minimum value.
public static long? GetIdentityMinValue(this IReadOnlyProperty property)
Parameters
propertyIReadOnlyPropertyThe property.
Returns
- long?
The identity minimum value.
GetIdentityMinValueConfigurationSource(IConventionProperty)
Returns the ConfigurationSource for the identity minimum value.
public static ConfigurationSource? GetIdentityMinValueConfigurationSource(this IConventionProperty property)
Parameters
propertyIConventionPropertyThe property.
Returns
- ConfigurationSource?
The ConfigurationSource for the identity minimum value.
GetIdentityNumbersToCache(IReadOnlyProperty)
Returns the number of sequence numbers to be preallocated and stored in memory for faster access. Defaults to 1 (no cache).
public static long? GetIdentityNumbersToCache(this IReadOnlyProperty property)
Parameters
propertyIReadOnlyPropertyThe property.
Returns
- long?
The number of sequence numbers to be cached.
GetIdentityNumbersToCacheConfigurationSource(IConventionProperty)
Returns the ConfigurationSource for the number of sequence numbers to be preallocated and stored in memory for faster access.
public static ConfigurationSource? GetIdentityNumbersToCacheConfigurationSource(this IConventionProperty property)
Parameters
propertyIConventionPropertyThe property.
Returns
- ConfigurationSource?
The ConfigurationSource for the number of sequence numbers to be preallocated and stored in memory for faster access.
GetIdentityStartValue(IReadOnlyProperty)
Returns the identity start value.
public static long? GetIdentityStartValue(this IReadOnlyProperty property)
Parameters
propertyIReadOnlyPropertyThe property.
Returns
- long?
The identity start value.
GetIdentityStartValueConfigurationSource(IConventionProperty)
Returns the ConfigurationSource for the identity start value.
public static ConfigurationSource? GetIdentityStartValueConfigurationSource(this IConventionProperty property)
Parameters
propertyIConventionPropertyThe property.
Returns
- ConfigurationSource?
The ConfigurationSource for the identity start value.
GetSequenceName(IReadOnlyProperty)
Returns the name to use for the key value generation sequence.
public static string? GetSequenceName(this IReadOnlyProperty property)
Parameters
propertyIReadOnlyPropertyThe property.
Returns
- string
The name to use for the key value generation sequence.
GetSequenceName(IReadOnlyProperty, in StoreObjectIdentifier)
Returns the name to use for the key value generation sequence.
public static string? GetSequenceName(this IReadOnlyProperty property, in StoreObjectIdentifier storeObject)
Parameters
propertyIReadOnlyPropertyThe property.
storeObjectStoreObjectIdentifierThe identifier of the store object.
Returns
- string
The name to use for the key value generation sequence.
GetSequenceNameConfigurationSource(IConventionProperty)
Returns the ConfigurationSource for the key value generation sequence name.
public static ConfigurationSource? GetSequenceNameConfigurationSource(this IConventionProperty property)
Parameters
propertyIConventionPropertyThe property.
Returns
- ConfigurationSource?
The ConfigurationSource for the key value generation sequence name.
GetSequenceSchema(IReadOnlyProperty)
Returns the schema to use for the key value generation sequence.
public static string? GetSequenceSchema(this IReadOnlyProperty property)
Parameters
propertyIReadOnlyPropertyThe property.
Returns
- string
The schema to use for the key value generation sequence.
GetSequenceSchema(IReadOnlyProperty, in StoreObjectIdentifier)
Returns the schema to use for the key value generation sequence.
public static string? GetSequenceSchema(this IReadOnlyProperty property, in StoreObjectIdentifier storeObject)
Parameters
propertyIReadOnlyPropertyThe property.
storeObjectStoreObjectIdentifierThe identifier of the store object.
Returns
- string
The schema to use for the key value generation sequence.
GetSequenceSchemaConfigurationSource(IConventionProperty)
Returns the ConfigurationSource for the key value generation sequence schema.
public static ConfigurationSource? GetSequenceSchemaConfigurationSource(this IConventionProperty property)
Parameters
propertyIConventionPropertyThe property.
Returns
- ConfigurationSource?
The ConfigurationSource for the key value generation sequence schema.
GetTsVectorConfig(IReadOnlyProperty)
Returns the text search configuration for this generated tsvector property, or null if this is not a
generated tsvector property.
public static string? GetTsVectorConfig(this IReadOnlyProperty property)
Parameters
propertyIReadOnlyPropertyThe property.
Returns
- string
The text search configuration for this generated tsvector property, or
nullif this is not a generated tsvector property.See https://www.postgresql.org/docs/current/textsearch-controls.html for more information.
GetTsVectorConfigConfigurationSource(IConventionProperty)
Returns the ConfigurationSource for the text search configuration for the generated tsvector property.
public static ConfigurationSource? GetTsVectorConfigConfigurationSource(this IConventionProperty property)
Parameters
propertyIConventionPropertyThe property.
Returns
- ConfigurationSource?
The configuration source for the text search configuration for the generated tsvector property.
GetTsVectorProperties(IReadOnlyProperty)
Returns the properties included in this generated tsvector property, or null if this is not a
generated tsvector property.
public static IReadOnlyList<string>? GetTsVectorProperties(this IReadOnlyProperty property)
Parameters
propertyIReadOnlyPropertyThe property.
Returns
- IReadOnlyList<string>
The included property names, or
nullif this is not a Generated tsvector column.
GetTsVectorPropertiesConfigurationSource(IConventionProperty)
Returns the ConfigurationSource for the properties included in the generated tsvector property.
public static ConfigurationSource? GetTsVectorPropertiesConfigurationSource(this IConventionProperty property)
Parameters
propertyIConventionPropertyThe property.
Returns
- ConfigurationSource?
The configuration source for the properties included in the generated tsvector property.
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 IModel.
public static NpgsqlValueGenerationStrategy GetValueGenerationStrategy(this IReadOnlyProperty property)
Parameters
propertyIReadOnlyProperty
Returns
- NpgsqlValueGenerationStrategy
The strategy, or None if none was set.
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 IModel.
public static NpgsqlValueGenerationStrategy GetValueGenerationStrategy(this IReadOnlyProperty property, in StoreObjectIdentifier storeObject)
Parameters
propertyIReadOnlyPropertyThe property.
storeObjectStoreObjectIdentifierThe identifier of the store object.
Returns
- NpgsqlValueGenerationStrategy
The strategy, or None if none was set.
GetValueGenerationStrategy(IReadOnlyRelationalPropertyOverrides)
Returns the NpgsqlValueGenerationStrategy to use for the property.
public static NpgsqlValueGenerationStrategy? GetValueGenerationStrategy(this IReadOnlyRelationalPropertyOverrides overrides)
Parameters
overridesIReadOnlyRelationalPropertyOverridesThe property overrides.
Returns
- 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 IModel.
GetValueGenerationStrategyConfigurationSource(IConventionProperty)
Returns the ConfigurationSource for the NpgsqlValueGenerationStrategy.
public static ConfigurationSource? GetValueGenerationStrategyConfigurationSource(this IConventionProperty property)
Parameters
propertyIConventionPropertyThe property.
Returns
GetValueGenerationStrategyConfigurationSource(IConventionProperty, in StoreObjectIdentifier)
Returns the ConfigurationSource for the NpgsqlValueGenerationStrategy for a particular table.
public static ConfigurationSource? GetValueGenerationStrategyConfigurationSource(this IConventionProperty property, in StoreObjectIdentifier storeObject)
Parameters
propertyIConventionPropertyThe property.
storeObjectStoreObjectIdentifierThe identifier of the table containing the column.
Returns
GetValueGenerationStrategyConfigurationSource(IConventionRelationalPropertyOverrides)
Returns the ConfigurationSource for the NpgsqlValueGenerationStrategy for a particular table.
public static ConfigurationSource? GetValueGenerationStrategyConfigurationSource(this IConventionRelationalPropertyOverrides overrides)
Parameters
overridesIConventionRelationalPropertyOverridesThe property overrides.
Returns
IsCompatibleWithValueGeneration(IReadOnlyProperty)
Returns a value indicating whether the property is compatible with any NpgsqlValueGenerationStrategy.
public static bool IsCompatibleWithValueGeneration(IReadOnlyProperty property)
Parameters
propertyIReadOnlyPropertyThe property.
Returns
RemoveHiLoOptions(IConventionProperty)
Removes all identity sequence annotations from the property.
public static void RemoveHiLoOptions(this IConventionProperty property)
Parameters
propertyIConventionProperty
RemoveHiLoOptions(IMutableProperty)
Removes all identity sequence annotations from the property.
public static void RemoveHiLoOptions(this IMutableProperty property)
Parameters
propertyIMutableProperty
RemoveIdentityOptions(IConventionProperty)
Removes identity sequence options from the property.
public static void RemoveIdentityOptions(this IConventionProperty property)
Parameters
propertyIConventionProperty
RemoveIdentityOptions(IMutableProperty)
Removes identity sequence options from the property.
public static void RemoveIdentityOptions(this IMutableProperty property)
Parameters
propertyIMutableProperty
SetCompressionMethod(IConventionProperty, string?, bool)
Sets the compression method to be used, or null if it hasn't been specified.
public static string? SetCompressionMethod(this IConventionProperty property, string? compressionMethod, bool fromDataAnnotation = false)
Parameters
propertyIConventionPropertycompressionMethodstringfromDataAnnotationbool
Returns
Remarks
This feature was introduced in PostgreSQL 14.
SetCompressionMethod(IMutableProperty, string?)
Sets the compression method to be used, or null if it hasn't been specified.
public static void SetCompressionMethod(this IMutableProperty property, string? compressionMethod)
Parameters
propertyIMutablePropertycompressionMethodstring
Remarks
This feature was introduced in PostgreSQL 14.
SetHiLoSequenceName(IConventionProperty, string?, bool)
Sets the name to use for the hi-lo sequence.
public static string? SetHiLoSequenceName(this IConventionProperty property, string? name, bool fromDataAnnotation = false)
Parameters
propertyIConventionPropertyThe property.
namestringThe sequence name to use.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
SetHiLoSequenceName(IMutableProperty, string?)
Sets the name to use for the hi-lo sequence.
public static void SetHiLoSequenceName(this IMutableProperty property, string? name)
Parameters
propertyIMutablePropertyThe property.
namestringThe sequence name to use.
SetHiLoSequenceSchema(IConventionProperty, string?, bool)
Sets the schema to use for the hi-lo sequence.
public static string? SetHiLoSequenceSchema(this IConventionProperty property, string? schema, bool fromDataAnnotation = false)
Parameters
propertyIConventionPropertyThe property.
schemastringThe schema to use.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
SetHiLoSequenceSchema(IMutableProperty, string?)
Sets the schema to use for the hi-lo sequence.
public static void SetHiLoSequenceSchema(this IMutableProperty property, string? schema)
Parameters
propertyIMutablePropertyThe property.
schemastringThe schema to use.
SetIdentityIncrementBy(IConventionProperty, long?, bool)
Sets the identity increment value.
public static long? SetIdentityIncrementBy(this IConventionProperty property, long? incrementBy, bool fromDataAnnotation = false)
Parameters
propertyIConventionPropertyThe property.
incrementBylong?The value to set.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- long?
SetIdentityIncrementBy(IMutableProperty, long?)
Sets the identity increment value.
public static void SetIdentityIncrementBy(this IMutableProperty property, long? incrementBy)
Parameters
propertyIMutablePropertyThe property.
incrementBylong?The value to set.
SetIdentityIsCyclic(IConventionProperty, bool?, bool)
Sets whether the identity's sequence is cyclic.
public static bool? SetIdentityIsCyclic(this IConventionProperty property, bool? cyclic, bool fromDataAnnotation = false)
Parameters
propertyIConventionPropertyThe property.
cyclicbool?The value to set.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- bool?
SetIdentityIsCyclic(IMutableProperty, bool?)
Sets whether the identity's sequence is cyclic.
public static void SetIdentityIsCyclic(this IMutableProperty property, bool? cyclic)
Parameters
propertyIMutablePropertyThe property.
cyclicbool?The value to set.
SetIdentityMaxValue(IConventionProperty, long?, bool)
Sets the identity maximum value.
public static long? SetIdentityMaxValue(this IConventionProperty property, long? maxValue, bool fromDataAnnotation = false)
Parameters
propertyIConventionPropertyThe property.
maxValuelong?The value to set.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- long?
SetIdentityMaxValue(IMutableProperty, long?)
Sets the identity maximum value.
public static void SetIdentityMaxValue(this IMutableProperty property, long? maxValue)
Parameters
propertyIMutablePropertyThe property.
maxValuelong?The value to set.
SetIdentityMinValue(IConventionProperty, long?, bool)
Sets the identity minimum value.
public static long? SetIdentityMinValue(this IConventionProperty property, long? minValue, bool fromDataAnnotation = false)
Parameters
propertyIConventionPropertyThe property.
minValuelong?The value to set.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- long?
SetIdentityMinValue(IMutableProperty, long?)
Sets the identity minimum value.
public static void SetIdentityMinValue(this IMutableProperty property, long? minValue)
Parameters
propertyIMutablePropertyThe property.
minValuelong?The value to set.
SetIdentityNumbersToCache(IConventionProperty, long?, bool)
Sets the number of sequence numbers to be preallocated and stored in memory for faster access.
public static long? SetIdentityNumbersToCache(this IConventionProperty property, long? numbersToCache, bool fromDataAnnotation = false)
Parameters
propertyIConventionPropertyThe property.
numbersToCachelong?The value to set.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- long?
SetIdentityNumbersToCache(IMutableProperty, long?)
Sets the number of sequence numbers to be preallocated and stored in memory for faster access.
public static void SetIdentityNumbersToCache(this IMutableProperty property, long? numbersToCache)
Parameters
propertyIMutablePropertyThe property.
numbersToCachelong?The value to set.
SetIdentityStartValue(IConventionProperty, long?, bool)
Sets the identity start value.
public static long? SetIdentityStartValue(this IConventionProperty property, long? startValue, bool fromDataAnnotation = false)
Parameters
propertyIConventionPropertyThe property.
startValuelong?The value to set.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- long?
SetIdentityStartValue(IMutableProperty, long?)
Sets the identity start value.
public static void SetIdentityStartValue(this IMutableProperty property, long? startValue)
Parameters
propertyIMutablePropertyThe property.
startValuelong?The value to set.
SetSequenceName(IConventionProperty, string?, bool)
Sets the name to use for the key value generation sequence.
public static string? SetSequenceName(this IConventionProperty property, string? name, bool fromDataAnnotation = false)
Parameters
propertyIConventionPropertyThe property.
namestringThe sequence name to use.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- string
The configured value.
SetSequenceName(IMutableProperty, string?)
Sets the name to use for the key value generation sequence.
public static void SetSequenceName(this IMutableProperty property, string? name)
Parameters
propertyIMutablePropertyThe property.
namestringThe sequence name to use.
SetSequenceSchema(IConventionProperty, string?, bool)
Sets the schema to use for the key value generation sequence.
public static string? SetSequenceSchema(this IConventionProperty property, string? schema, bool fromDataAnnotation = false)
Parameters
propertyIConventionPropertyThe property.
schemastringThe schema to use.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- string
The configured value.
SetSequenceSchema(IMutableProperty, string?)
Sets the schema to use for the key value generation sequence.
public static void SetSequenceSchema(this IMutableProperty property, string? schema)
Parameters
propertyIMutablePropertyThe property.
schemastringThe schema to use.
SetTsVectorConfig(IConventionProperty, string, bool)
Returns the text search configuration for this generated tsvector property, or null if this is not a
generated tsvector property.
public static string SetTsVectorConfig(this IConventionProperty property, string config, bool fromDataAnnotation = false)
Parameters
propertyIConventionPropertyThe property.
configstringThe text search configuration for this generated tsvector property, or
nullif this is not a generated tsvector property.See https://www.postgresql.org/docs/current/textsearch-controls.html for more information.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
SetTsVectorConfig(IMutableProperty, string?)
Sets the text search configuration for this generated tsvector property, or null if this is not a
generated tsvector property.
public static void SetTsVectorConfig(this IMutableProperty property, string? config)
Parameters
propertyIMutablePropertyThe property.
configstringThe text search configuration for this generated tsvector property, or
nullif this is not a generated tsvector property.See https://www.postgresql.org/docs/current/textsearch-controls.html for more information.
SetTsVectorProperties(IConventionProperty, IReadOnlyList<string>?, bool)
Sets properties included in this generated tsvector property, or null to make this a regular,
non-generated property.
public static IReadOnlyList<string>? SetTsVectorProperties(this IConventionProperty property, IReadOnlyList<string>? properties, bool fromDataAnnotation = false)
Parameters
propertyIConventionPropertyThe property.
propertiesIReadOnlyList<string>The included property names.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
SetTsVectorProperties(IMutableProperty, IReadOnlyList<string>?)
Sets the properties included in this generated tsvector property, or null to make this a regular,
non-generated property.
public static void SetTsVectorProperties(this IMutableProperty property, IReadOnlyList<string>? properties)
Parameters
propertyIMutablePropertyThe property.
propertiesIReadOnlyList<string>The included property names.
SetValueGenerationStrategy(IConventionProperty, NpgsqlValueGenerationStrategy?, in StoreObjectIdentifier, bool)
Sets the NpgsqlValueGenerationStrategy to use for the property for a particular table.
public static NpgsqlValueGenerationStrategy? SetValueGenerationStrategy(this IConventionProperty property, NpgsqlValueGenerationStrategy? value, in StoreObjectIdentifier storeObject, bool fromDataAnnotation = false)
Parameters
propertyIConventionPropertyThe property.
valueNpgsqlValueGenerationStrategy?The strategy to use.
storeObjectStoreObjectIdentifierThe identifier of the table containing the column.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- NpgsqlValueGenerationStrategy?
The configured value.
SetValueGenerationStrategy(IConventionProperty, NpgsqlValueGenerationStrategy?, bool)
Sets the NpgsqlValueGenerationStrategy to use for the property.
public static NpgsqlValueGenerationStrategy? SetValueGenerationStrategy(this IConventionProperty property, NpgsqlValueGenerationStrategy? value, bool fromDataAnnotation = false)
Parameters
propertyIConventionPropertyThe property.
valueNpgsqlValueGenerationStrategy?The strategy to use.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
SetValueGenerationStrategy(IConventionRelationalPropertyOverrides, NpgsqlValueGenerationStrategy?, bool)
Sets the NpgsqlValueGenerationStrategy to use for the property for a particular table.
public static NpgsqlValueGenerationStrategy? SetValueGenerationStrategy(this IConventionRelationalPropertyOverrides overrides, NpgsqlValueGenerationStrategy? value, bool fromDataAnnotation = false)
Parameters
overridesIConventionRelationalPropertyOverridesThe property overrides.
valueNpgsqlValueGenerationStrategy?The strategy to use.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- NpgsqlValueGenerationStrategy?
The configured value.
SetValueGenerationStrategy(IMutableProperty, NpgsqlValueGenerationStrategy?)
Sets the NpgsqlValueGenerationStrategy to use for the property.
public static void SetValueGenerationStrategy(this IMutableProperty property, NpgsqlValueGenerationStrategy? value)
Parameters
propertyIMutablePropertyThe property.
valueNpgsqlValueGenerationStrategy?The strategy to use.
SetValueGenerationStrategy(IMutableProperty, NpgsqlValueGenerationStrategy?, in StoreObjectIdentifier)
Sets the NpgsqlValueGenerationStrategy to use for the property for a particular table.
public static void SetValueGenerationStrategy(this IMutableProperty property, NpgsqlValueGenerationStrategy? value, in StoreObjectIdentifier storeObject)
Parameters
propertyIMutablePropertyThe property.
valueNpgsqlValueGenerationStrategy?The strategy to use.
storeObjectStoreObjectIdentifierThe identifier of the table containing the column.
SetValueGenerationStrategy(IMutableRelationalPropertyOverrides, NpgsqlValueGenerationStrategy?)
Sets the NpgsqlValueGenerationStrategy to use for the property for a particular table.
public static void SetValueGenerationStrategy(this IMutableRelationalPropertyOverrides overrides, NpgsqlValueGenerationStrategy? value)
Parameters
overridesIMutableRelationalPropertyOverridesThe property overrides.
valueNpgsqlValueGenerationStrategy?The strategy to use.