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
property
IPropertyThe 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
property
IPropertyThe property.
storeObject
StoreObjectIdentifierThe 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
property
IReadOnlyPropertyThe 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
property
IReadOnlyPropertyThe property.
storeObject
StoreObjectIdentifierThe 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
property
IPropertyThe 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
property
IPropertyThe property.
storeObject
StoreObjectIdentifierThe 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
property
IReadOnlyPropertyThe 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
property
IReadOnlyPropertyThe property.
storeObject
StoreObjectIdentifierThe 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
property
IReadOnlyProperty
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
property
IReadOnlyPropertystoreObject
StoreObjectIdentifier
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
index
IConventionPropertyThe property.
Returns
- ConfigurationSource?
The ConfigurationSource for the compression method.
GetHiLoSequenceName(IReadOnlyProperty)
Returns the name to use for the hi-lo sequence.
public static string? GetHiLoSequenceName(this IReadOnlyProperty property)
Parameters
property
IReadOnlyPropertyThe 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
property
IReadOnlyPropertyThe property.
storeObject
StoreObjectIdentifierThe 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
property
IConventionPropertyThe 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
property
IReadOnlyPropertyThe 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
property
IReadOnlyPropertyThe property.
storeObject
StoreObjectIdentifierThe 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
property
IConventionPropertyThe 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
property
IReadOnlyPropertyThe 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
property
IConventionPropertyThe 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
property
IReadOnlyPropertyThe 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
property
IConventionPropertyThe 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
property
IReadOnlyPropertyThe 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
property
IConventionPropertyThe 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
property
IReadOnlyPropertyThe 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
property
IConventionPropertyThe 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
property
IReadOnlyPropertyThe 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
property
IConventionPropertyThe 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
property
IReadOnlyPropertyThe 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
property
IConventionPropertyThe 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
property
IReadOnlyPropertyThe 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
property
IReadOnlyPropertyThe property.
storeObject
StoreObjectIdentifierThe 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
property
IConventionPropertyThe 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
property
IReadOnlyPropertyThe 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
property
IReadOnlyPropertyThe property.
storeObject
StoreObjectIdentifierThe 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
property
IConventionPropertyThe 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
property
IReadOnlyPropertyThe property.
Returns
- 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.
GetTsVectorConfigConfigurationSource(IConventionProperty)
Returns the ConfigurationSource for the text search configuration for the generated tsvector property.
public static ConfigurationSource? GetTsVectorConfigConfigurationSource(this IConventionProperty property)
Parameters
property
IConventionPropertyThe 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
property
IReadOnlyPropertyThe property.
Returns
- IReadOnlyList<string>
The included property names, or
null
if 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
property
IConventionPropertyThe 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
property
IReadOnlyProperty
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
property
IReadOnlyPropertyThe property.
storeObject
StoreObjectIdentifierThe 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
overrides
IReadOnlyRelationalPropertyOverridesThe 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
property
IConventionPropertyThe 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
property
IConventionPropertyThe property.
storeObject
StoreObjectIdentifierThe 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
overrides
IConventionRelationalPropertyOverridesThe property overrides.
Returns
IsCompatibleWithValueGeneration(IReadOnlyProperty)
Returns a value indicating whether the property is compatible with any NpgsqlValueGenerationStrategy.
public static bool IsCompatibleWithValueGeneration(IReadOnlyProperty property)
Parameters
property
IReadOnlyPropertyThe property.
Returns
RemoveHiLoOptions(IConventionProperty)
Removes all identity sequence annotations from the property.
public static void RemoveHiLoOptions(this IConventionProperty property)
Parameters
property
IConventionProperty
RemoveHiLoOptions(IMutableProperty)
Removes all identity sequence annotations from the property.
public static void RemoveHiLoOptions(this IMutableProperty property)
Parameters
property
IMutableProperty
RemoveIdentityOptions(IConventionProperty)
Removes identity sequence options from the property.
public static void RemoveIdentityOptions(this IConventionProperty property)
Parameters
property
IConventionProperty
RemoveIdentityOptions(IMutableProperty)
Removes identity sequence options from the property.
public static void RemoveIdentityOptions(this IMutableProperty property)
Parameters
property
IMutableProperty
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
property
IConventionPropertycompressionMethod
stringfromDataAnnotation
bool
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
property
IMutablePropertycompressionMethod
string
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
property
IConventionPropertyThe property.
name
stringThe sequence name to use.
fromDataAnnotation
boolIndicates 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
property
IMutablePropertyThe property.
name
stringThe 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
property
IConventionPropertyThe property.
schema
stringThe schema to use.
fromDataAnnotation
boolIndicates 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
property
IMutablePropertyThe property.
schema
stringThe 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
property
IConventionPropertyThe property.
incrementBy
long?The value to set.
fromDataAnnotation
boolIndicates 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
property
IMutablePropertyThe property.
incrementBy
long?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
property
IConventionPropertyThe property.
cyclic
bool?The value to set.
fromDataAnnotation
boolIndicates 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
property
IMutablePropertyThe property.
cyclic
bool?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
property
IConventionPropertyThe property.
maxValue
long?The value to set.
fromDataAnnotation
boolIndicates 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
property
IMutablePropertyThe property.
maxValue
long?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
property
IConventionPropertyThe property.
minValue
long?The value to set.
fromDataAnnotation
boolIndicates 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
property
IMutablePropertyThe property.
minValue
long?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
property
IConventionPropertyThe property.
numbersToCache
long?The value to set.
fromDataAnnotation
boolIndicates 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
property
IMutablePropertyThe property.
numbersToCache
long?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
property
IConventionPropertyThe property.
startValue
long?The value to set.
fromDataAnnotation
boolIndicates 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
property
IMutablePropertyThe property.
startValue
long?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
property
IConventionPropertyThe property.
name
stringThe sequence name to use.
fromDataAnnotation
boolIndicates 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
property
IMutablePropertyThe property.
name
stringThe 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
property
IConventionPropertyThe property.
schema
stringThe schema to use.
fromDataAnnotation
boolIndicates 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
property
IMutablePropertyThe property.
schema
stringThe 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
property
IConventionPropertyThe property.
config
stringThe 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.
fromDataAnnotation
boolIndicates 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
property
IMutablePropertyThe property.
config
stringThe 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.
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
property
IConventionPropertyThe property.
properties
IReadOnlyList<string>The included property names.
fromDataAnnotation
boolIndicates 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
property
IMutablePropertyThe property.
properties
IReadOnlyList<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
property
IConventionPropertyThe property.
value
NpgsqlValueGenerationStrategy?The strategy to use.
storeObject
StoreObjectIdentifierThe identifier of the table containing the column.
fromDataAnnotation
boolIndicates 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
property
IConventionPropertyThe property.
value
NpgsqlValueGenerationStrategy?The strategy to use.
fromDataAnnotation
boolIndicates 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
overrides
IConventionRelationalPropertyOverridesThe property overrides.
value
NpgsqlValueGenerationStrategy?The strategy to use.
fromDataAnnotation
boolIndicates 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
property
IMutablePropertyThe property.
value
NpgsqlValueGenerationStrategy?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
property
IMutablePropertyThe property.
value
NpgsqlValueGenerationStrategy?The strategy to use.
storeObject
StoreObjectIdentifierThe 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
overrides
IMutableRelationalPropertyOverridesThe property overrides.
value
NpgsqlValueGenerationStrategy?The strategy to use.