EntityTypeExtensions.GetDeclaredNavigations(IEntityType) 方法

定义

获取在给定 IEntityType的 上声明的所有导航属性。

此方法不返回在基类型上声明的导航属性。 循环访问所有实体类型时,它非常有用,以避免多次处理相同的导航属性。 使用 GetNavigations(IEntityType) 还返回在基类型上声明的导航属性。

public static System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Metadata.INavigation> GetDeclaredNavigations (this Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType);
static member GetDeclaredNavigations : Microsoft.EntityFrameworkCore.Metadata.IEntityType -> seq<Microsoft.EntityFrameworkCore.Metadata.INavigation>
<Extension()>
Public Function GetDeclaredNavigations (entityType As IEntityType) As IEnumerable(Of INavigation)

参数

entityType
IEntityType

实体类型。

返回

声明的导航属性。

适用于