NavigationExtensions NavigationExtensions Class

Extension methods for INavigation.

Syntax

Declaration

public static class NavigationExtensionsPublic Module NavigationExtensions

Inheritance Hierarchy

  • System.Object
    System.Object
  • NavigationExtensions
    NavigationExtensions

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 the navigation property on the other end of the relationship. Returns null if there is no navigation property defined on the other end of the relationship.

Gets the entity type that a given navigation property will hold an instance of (or hold instances of if it is a collection navigation).

Gets a value indicating whether the given navigation property is a collection property.

Gets a value indicating whether the given navigation property is the navigation property on the dependent entity type that points to the principal entity.

Methods

  • FindInverse(INavigation)
    FindInverse(INavigation)

    Gets the navigation property on the other end of the relationship. Returns null if there is no navigation property defined on the other end of the relationship.

    public static INavigation FindInverse(this INavigation navigation)<ExtensionAttribute>
    Public Shared Function FindInverse(navigation As INavigation) As INavigation

    Parameters

    Returns

  • GetTargetType(INavigation)
    GetTargetType(INavigation)

    Gets the entity type that a given navigation property will hold an instance of (or hold instances of if it is a collection navigation).

    public static IEntityType GetTargetType(this INavigation navigation)<ExtensionAttribute>
    Public Shared Function GetTargetType(navigation As INavigation) As IEntityType

    Parameters

    Returns

  • IsCollection(INavigation)
    IsCollection(INavigation)

    Gets a value indicating whether the given navigation property is a collection property.

    public static bool IsCollection(this INavigation navigation)<ExtensionAttribute>
    Public Shared Function IsCollection(navigation As INavigation) As Boolean

    Parameters

    Returns

    • System.Boolean
      System.Boolean

      True if this is a collection property, false if it is a reference property.

  • IsDependentToPrincipal(INavigation)
    IsDependentToPrincipal(INavigation)

    Gets a value indicating whether the given navigation property is the navigation property on the dependent entity type that points to the principal entity.

    public static bool IsDependentToPrincipal(this INavigation navigation)<ExtensionAttribute>
    Public Shared Function IsDependentToPrincipal(navigation As INavigation) As Boolean

    Parameters

    Returns

    • System.Boolean
      System.Boolean

      True if the given navigation property is the navigation property on the dependent entity type that points to the principal entity, otherwise false.

Details

Assembly

Microsoft.EntityFrameworkCore.dll