MutablePropertyExtensions MutablePropertyExtensions Class

Definition

Extension methods for IMutableProperty.

public static class MutablePropertyExtensions
Public Module MutablePropertyExtensions
Inheritance
System.ObjectSystem.Object
MutablePropertyExtensionsMutablePropertyExtensions

Inherited Members

System.Object

System.Object.ToString()System.Object.ToString()
System.Object.Equals(System.Object)System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()System.Object.GetHashCode()
System.Object.GetType()System.Object.GetType()
System.Object.MemberwiseClone()System.Object.MemberwiseClone()

Methods

GetContainingForeignKeys(IMutableProperty) GetContainingForeignKeys(IMutableProperty)

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

public static IEnumerable<IMutableForeignKey> GetContainingForeignKeys(this IMutableProperty property)
<ExtensionAttribute>
Public Shared Function GetContainingForeignKeys(property As IMutableProperty) As IEnumerable(Of IMutableForeignKey)
Parameters
property
IMutableProperty IMutableProperty

The property to get foreign keys for.

Returns
System.Collections.Generic.IEnumerable<IMutableForeignKey> System.Collections.Generic.IEnumerable(Of IMutableForeignKey)

The foreign keys that use this property.

GetContainingKeys(IMutableProperty) GetContainingKeys(IMutableProperty)

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

public static IEnumerable<IMutableKey> GetContainingKeys(this IMutableProperty property)
<ExtensionAttribute>
Public Shared Function GetContainingKeys(property As IMutableProperty) As IEnumerable(Of IMutableKey)
Parameters
property
IMutableProperty IMutableProperty

The property to get primary and alternate keys for.

Returns
System.Collections.Generic.IEnumerable<IMutableKey> System.Collections.Generic.IEnumerable(Of IMutableKey)

The primary and alternate keys that use this property.

GetContainingPrimaryKey(IMutableProperty) GetContainingPrimaryKey(IMutableProperty)

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

public static IMutableKey GetContainingPrimaryKey(this IMutableProperty property)
<ExtensionAttribute>
Public Shared Function GetContainingPrimaryKey(property As IMutableProperty) As IMutableKey
Parameters
property
IMutableProperty IMutableProperty

The property to get primary key for.

Returns

The primary that use this property, or null if it is not part of the primary key.

IsUnicode(IMutableProperty, Nullable) IsUnicode(IMutableProperty, Nullable(Of Boolean))

Sets a value indicating whether or not this property can persist unicode characters.

public static void IsUnicode(this IMutableProperty property, bool ? unicode)
<ExtensionAttribute>
Public Shared Sub IsUnicode(property As IMutableProperty, unicode As Boolean?)
Parameters
property
IMutableProperty IMutableProperty

The property to set the value for.

unicode
System.Nullable<System.Boolean> System.Nullable(Of System.Boolean)

True if the property accepts unicode characters, false if it does not, null to clear the setting.

SetMaxLength(IMutableProperty, Nullable) SetMaxLength(IMutableProperty, Nullable(Of Int32))

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

public static void SetMaxLength(this IMutableProperty property, int ? maxLength)
<ExtensionAttribute>
Public Shared Sub SetMaxLength(property As IMutableProperty, maxLength As Integer?)
Parameters
property
IMutableProperty IMutableProperty

The property to set the maximum length of.

maxLength
System.Nullable<System.Int32> System.Nullable(Of System.Int32)

The maximum length of data that is allowed in this property.

SetValueGeneratorFactory(IMutableProperty, Func) SetValueGeneratorFactory(IMutableProperty, Func(Of IProperty, IEntityType, ValueGenerator))

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.

public static void SetValueGeneratorFactory(this IMutableProperty property, Func<IProperty, IEntityType, ValueGenerator> valueGeneratorFactory)
<ExtensionAttribute>
Public Shared Sub SetValueGeneratorFactory(property As IMutableProperty, valueGeneratorFactory As Func(Of IProperty, IEntityType, ValueGenerator))
Parameters
property
IMutableProperty IMutableProperty

The property to set the value generator for.

valueGeneratorFactory
System.Func<IProperty, IEntityType, ValueGenerator> System.Func(Of IProperty, IEntityType, ValueGenerator)

A factory that will be used to create the value generator, or null to clear any previously set factory.