IReadOnlyEntityType.GetDeclaredNavigations 方法

定义

获取在此实体类型上声明的所有导航属性。

public System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyNavigation> GetDeclaredNavigations ();
abstract member GetDeclaredNavigations : unit -> seq<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyNavigation>
Public Function GetDeclaredNavigations () As IEnumerable(Of IReadOnlyNavigation)

返回

声明的导航属性。

注解

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

适用于