NavigationExtensions.GetTargetType(INavigation) Method

Definition

Caution

Use INavigation.TargetEntityType

Caution

Use IReadOnlyNavigation.TargetEntityType

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 Microsoft.EntityFrameworkCore.Metadata.IEntityType GetTargetType (this Microsoft.EntityFrameworkCore.Metadata.INavigation navigation);
[System.Diagnostics.DebuggerStepThrough]
public static Microsoft.EntityFrameworkCore.Metadata.IEntityType GetTargetType (this Microsoft.EntityFrameworkCore.Metadata.INavigation navigation);
[System.Diagnostics.DebuggerStepThrough]
[System.Obsolete("Use INavigation.TargetEntityType")]
public static Microsoft.EntityFrameworkCore.Metadata.IEntityType GetTargetType (this Microsoft.EntityFrameworkCore.Metadata.INavigation navigation);
[System.Diagnostics.DebuggerStepThrough]
[System.Obsolete("Use IReadOnlyNavigation.TargetEntityType")]
public static Microsoft.EntityFrameworkCore.Metadata.IEntityType GetTargetType (this Microsoft.EntityFrameworkCore.Metadata.INavigation navigation);
static member GetTargetType : Microsoft.EntityFrameworkCore.Metadata.INavigation -> Microsoft.EntityFrameworkCore.Metadata.IEntityType
[<System.Diagnostics.DebuggerStepThrough>]
static member GetTargetType : Microsoft.EntityFrameworkCore.Metadata.INavigation -> Microsoft.EntityFrameworkCore.Metadata.IEntityType
[<System.Diagnostics.DebuggerStepThrough>]
[<System.Obsolete("Use INavigation.TargetEntityType")>]
static member GetTargetType : Microsoft.EntityFrameworkCore.Metadata.INavigation -> Microsoft.EntityFrameworkCore.Metadata.IEntityType
[<System.Diagnostics.DebuggerStepThrough>]
[<System.Obsolete("Use IReadOnlyNavigation.TargetEntityType")>]
static member GetTargetType : Microsoft.EntityFrameworkCore.Metadata.INavigation -> Microsoft.EntityFrameworkCore.Metadata.IEntityType
<Extension()>
Public Function GetTargetType (navigation As INavigation) As IEntityType

Parameters

navigation
INavigation

The navigation property to find the target entity type of.

Returns

The target entity type.

Attributes

Applies to