MutablePropertyExtensions MutablePropertyExtensions Class

Extension methods for IMutableProperty.

Syntax

Declaration

public static class MutablePropertyExtensionsPublic Module MutablePropertyExtensions

Inheritance Hierarchy

  • System.Object
    System.Object
  • MutablePropertyExtensions
    MutablePropertyExtensions

Inherited Members

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

Methods summary

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

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

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

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

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.

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.

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

    Returns

  • 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

    Returns

    • System.Collections.Generic.IEnumerable<T><IMutableKey>
      System.Collections.Generic.IEnumerable<T>(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

    Returns

  • IsUnicode(IMutableProperty, Nullable<Boolean>)
    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

      The property to set the value for.

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

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

  • SetMaxLength(IMutableProperty, Nullable<Int32>)
    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

      The property to set the maximum length of.

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

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

  • SetValueGeneratorFactory(IMutableProperty, Func<IProperty, IEntityType, ValueGenerator>)
    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

Details

Assembly

Microsoft.EntityFrameworkCore.dll