DbEntityEntry.Reference 方法

[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]

获取一个对象,该对象表示从该实体到其他实体的引用 (即非集合)导航属性。

命名空间:  System.Data.Entity.Infrastructure
程序集:  EntityFramework(在 EntityFramework.dll 中)

语法

声明
Public Function Reference ( _
    navigationProperty As String _
) As DbReferenceEntry
用法
Dim instance As DbEntityEntry 
Dim navigationProperty As String 
Dim returnValue As DbReferenceEntry 

returnValue = instance.Reference(navigationProperty)
public DbReferenceEntry Reference(
    string navigationProperty
)
public:
DbReferenceEntry^ Reference(
    String^ navigationProperty
)
member Reference : 
        navigationProperty:string -> DbReferenceEntry
public function Reference(
    navigationProperty : String
) : DbReferenceEntry

参数

  • navigationProperty
    类型:System.String
    导航属性的名称。

返回值

类型:System.Data.Entity.Infrastructure.DbReferenceEntry
表示导航属性的对象。

请参阅

参考

DbEntityEntry 类

System.Data.Entity.Infrastructure 命名空间