Delen via


ConventionPropertyExtensions Class

Definition

Caution

Use IConventionProperty

Extension methods for IConventionProperty.

public static class ConventionPropertyExtensions
[System.Obsolete("Use IConventionProperty")]
public static class ConventionPropertyExtensions
type ConventionPropertyExtensions = class
[<System.Obsolete("Use IConventionProperty")>]
type ConventionPropertyExtensions = class
Public Module ConventionPropertyExtensions
Inheritance
ConventionPropertyExtensions
Attributes

Methods

FindContainingPrimaryKey(IConventionProperty)

Gets the primary key that uses this property (including a composite primary key in which this property is included).

FindFirstPrincipal(IConventionProperty)

Finds the first principal property that the given property is constrained by if the given property is part of a foreign key.

FindPrincipals(IConventionProperty)
Obsolete.

Finds the list of principal properties including the given property that the given property is constrained by if the given property is part of a foreign key.

GetAfterSaveBehaviorConfigurationSource(IConventionProperty)

Returns the configuration source for GetAfterSaveBehavior(IProperty).

GetBeforeSaveBehaviorConfigurationSource(IConventionProperty)

Returns the configuration source for GetBeforeSaveBehavior(IProperty).

GetContainingForeignKeys(IConventionProperty)

Gets all foreign keys that use this property (including composite foreign keys in which this property is included).

GetContainingIndexes(IConventionProperty)

Gets all indexes that use this property (including composite indexes in which this property is included).

GetContainingKeys(IConventionProperty)

Gets all primary or alternate keys that use this property (including composite keys in which this property is included).

GetIsUnicodeConfigurationSource(IConventionProperty)

Returns the configuration source for IsUnicode(IProperty).

GetKeyValueComparerConfigurationSource(IConventionProperty)
Obsolete.

Returns the configuration source for GetKeyValueComparer().

GetMaxLengthConfigurationSource(IConventionProperty)

Returns the configuration source for GetMaxLength(IProperty).

GetPrecisionConfigurationSource(IConventionProperty)

Returns the configuration source for GetPrecision(IProperty).

GetProviderClrTypeConfigurationSource(IConventionProperty)

Returns the configuration source for GetProviderClrType(IProperty).

GetScaleConfigurationSource(IConventionProperty)

Returns the configuration source for GetScale(IProperty).

GetStructuralValueComparerConfigurationSource(IConventionProperty)
Obsolete.

Returns the configuration source for GetStructuralValueComparer(IProperty).

GetTypeMappingConfigurationSource(IConventionProperty)

Gets the ConfigurationSource for FindTypeMapping(IProperty).

GetValueComparerConfigurationSource(IConventionProperty)

Returns the configuration source for GetValueComparer(IProperty).

GetValueConverterConfigurationSource(IConventionProperty)

Returns the configuration source for GetValueConverter(IProperty).

GetValueGeneratorFactoryConfigurationSource(IConventionProperty)

Returns the configuration source for GetValueGeneratorFactory(IProperty).

SetAfterSaveBehavior(IConventionProperty, Nullable<PropertySaveBehavior>, Boolean)

Sets a value indicating whether this property can be modified after the entity is saved to the database.

If Throw, then an exception will be thrown if a new value is assigned to this property after the entity exists in the database.

If Ignore, then any modification to the property value of an entity that already exists in the database will be ignored.

SetBeforeSaveBehavior(IConventionProperty, Nullable<PropertySaveBehavior>, Boolean)

Sets a value indicating whether this property can be modified before the entity is saved to the database.

If Throw, then an exception will be thrown if a value is assigned to this property when it is in the Added state.

If Ignore, then any value set will be ignored when it is in the Added state.

SetIsUnicode(IConventionProperty, Nullable<Boolean>, Boolean)

Sets a value indicating whether this property can persist Unicode characters.

SetKeyValueComparer(IConventionProperty, ValueComparer, Boolean)
Obsolete.

Sets the custom ValueComparer for this property when performing key comparisons.

SetMaxLength(IConventionProperty, Nullable<Int32>, Boolean)

Sets the maximum length of data that is allowed in this property. For example, if the property is a String ' then this is the maximum number of characters.

SetPrecision(IConventionProperty, Nullable<Int32>, Boolean)

Sets the precision of data that is allowed in this property. For example, if the property is a Decimal then this is the maximum number of digits.

SetProviderClrType(IConventionProperty, Type, Boolean)

Sets the type that the property value will be converted to before being sent to the database provider.

SetScale(IConventionProperty, Nullable<Int32>, Boolean)

Sets the scale of data that is allowed in this property. For example, if the property is a Decimal then this is the maximum number of decimal places.

SetStructuralValueComparer(IConventionProperty, ValueComparer, Boolean)
Obsolete.

Sets the custom ValueComparer for structural copies for this property.

SetTypeMapping(IConventionProperty, CoreTypeMapping, Boolean)

Sets the CoreTypeMapping for the given property

SetValueComparer(IConventionProperty, ValueComparer, Boolean)

Sets the custom ValueComparer for this property.

SetValueConverter(IConventionProperty, ValueConverter, Boolean)

Sets the custom ValueConverter for this property.

SetValueGeneratorFactory(IConventionProperty, Func<IProperty,IEntityType,ValueGenerator>, Boolean)

Sets the factory to use for generating values for this property, or null to clear any previously set factory.

Setting null does not disable value generation for this property, it just clears any generator explicitly configured for this property. The database provider may still have a value generator for the property type.

Applies to