PropertyExtensions PropertyExtensions Class

Extension methods for IProperty.

Syntax

Declaration

public static class PropertyExtensionsPublic Module PropertyExtensions

Inheritance Hierarchy

  • System.Object
    System.Object
  • PropertyExtensions
    PropertyExtensions

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 indexes that use this property (including composite indexes 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).

Gets 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.

Gets the factory that has been set to generate values for this property, if any.

Gets a value indicating whether this property is used as a foreign key (or part of a composite foreign key).

Gets a value indicating whether this property is used as an index (or part of a composite index).

Gets a value indicating whether this property is used as part of a primary or alternate key (or part of a composite primary or alternate key).

Gets a value indicating whether this property is used as the primary key (or part of a composite primary key).

Gets a value indicating whether or not the property can persist unicode characters.

Methods

  • GetContainingForeignKeys(IProperty)
    GetContainingForeignKeys(IProperty)

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

    public static IEnumerable<IForeignKey> GetContainingForeignKeys(this IProperty property)<ExtensionAttribute>
    Public Shared Function GetContainingForeignKeys(property As IProperty) As IEnumerable(Of IForeignKey)

    Parameters

    Returns

    • System.Collections.Generic.IEnumerable<T><IForeignKey>
      System.Collections.Generic.IEnumerable<T>(Of IForeignKey)

      The foreign keys that use this property.

  • GetContainingIndexes(IProperty)
    GetContainingIndexes(IProperty)

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

    public static IEnumerable<IIndex> GetContainingIndexes(this IProperty property)<ExtensionAttribute>
    Public Shared Function GetContainingIndexes(property As IProperty) As IEnumerable(Of IIndex)

    Parameters

    Returns

    • System.Collections.Generic.IEnumerable<T><IIndex>
      System.Collections.Generic.IEnumerable<T>(Of IIndex)

      The indexes that use this property.

  • GetContainingKeys(IProperty)
    GetContainingKeys(IProperty)

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

    public static IEnumerable<IKey> GetContainingKeys(this IProperty property)<ExtensionAttribute>
    Public Shared Function GetContainingKeys(property As IProperty) As IEnumerable(Of IKey)

    Parameters

    Returns

    • System.Collections.Generic.IEnumerable<T><IKey>
      System.Collections.Generic.IEnumerable<T>(Of IKey)

      The primary and alternate keys that use this property.

  • GetContainingPrimaryKey(IProperty)
    GetContainingPrimaryKey(IProperty)

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

    public static IKey GetContainingPrimaryKey(this IProperty property)<ExtensionAttribute>
    Public Shared Function GetContainingPrimaryKey(property As IProperty) As IKey

    Parameters

    Returns

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

  • GetMaxLength(IProperty)
    GetMaxLength(IProperty)

    Gets 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 int ? GetMaxLength(this IProperty property)<ExtensionAttribute>
    Public Shared Function GetMaxLength(property As IProperty) As Integer?

    Parameters

    Returns

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

      The maximum length, or null if none if defined.

  • GetValueGeneratorFactory(IProperty)
    GetValueGeneratorFactory(IProperty)

    Gets the factory that has been set to generate values for this property, if any.

    public static Func<IProperty, IEntityType, ValueGenerator> GetValueGeneratorFactory(this IProperty property)<ExtensionAttribute>
    Public Shared Function GetValueGeneratorFactory(property As IProperty) As Func(Of IProperty, IEntityType, ValueGenerator)

    Parameters

    Returns

  • IsForeignKey(IProperty)
    IsForeignKey(IProperty)

    Gets a value indicating whether this property is used as a foreign key (or part of a composite foreign key).

    public static bool IsForeignKey(this IProperty property)<ExtensionAttribute>
    Public Shared Function IsForeignKey(property As IProperty) As Boolean

    Parameters

    Returns

    • System.Boolean
      System.Boolean

      True if the property is used as a foreign key, otherwise false.

  • IsIndex(IProperty)
    IsIndex(IProperty)

    Gets a value indicating whether this property is used as an index (or part of a composite index).

    public static bool IsIndex(this IProperty property)<ExtensionAttribute>
    Public Shared Function IsIndex(property As IProperty) As Boolean

    Parameters

    Returns

    • System.Boolean
      System.Boolean

      True if the property is used as an index, otherwise false.

  • IsKey(IProperty)
    IsKey(IProperty)

    Gets a value indicating whether this property is used as part of a primary or alternate key (or part of a composite primary or alternate key).

    public static bool IsKey(this IProperty property)<ExtensionAttribute>
    Public Shared Function IsKey(property As IProperty) As Boolean

    Parameters

    Returns

    • System.Boolean
      System.Boolean

      True if the property is part of a key, otherwise false.

  • IsPrimaryKey(IProperty)
    IsPrimaryKey(IProperty)

    Gets a value indicating whether this property is used as the primary key (or part of a composite primary key).

    public static bool IsPrimaryKey(this IProperty property)<ExtensionAttribute>
    Public Shared Function IsPrimaryKey(property As IProperty) As Boolean

    Parameters

    Returns

    • System.Boolean
      System.Boolean

      True if the property is used as the primary key, otherwise false.

  • IsUnicode(IProperty)
    IsUnicode(IProperty)

    Gets a value indicating whether or not the property can persist unicode characters.

    public static bool ? IsUnicode(this IProperty property)<ExtensionAttribute>
    Public Shared Function IsUnicode(property As IProperty) As Boolean?

    Parameters

    Returns

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

      The unicode setting, or null if none if defined.

Details

Assembly

Microsoft.EntityFrameworkCore.dll