Share via


DataServiceContext.GetLinkDescriptor 方法

获取特定链接的 LinkDescriptor,以便定义两个实体之间的关系。

命名空间:  System.Data.Services.Client
程序集:  Microsoft.Data.Services.Client(在 Microsoft.Data.Services.Client.dll 中)

语法

声明
Public Function GetLinkDescriptor ( _
    source As Object, _
    sourceProperty As String, _
    target As Object _
) As LinkDescriptor
用法
Dim instance As DataServiceContext
Dim source As Object
Dim sourceProperty As String
Dim target As Object
Dim returnValue As LinkDescriptor

returnValue = instance.GetLinkDescriptor(source, _
    sourceProperty, target)
public LinkDescriptor GetLinkDescriptor(
    Object source,
    string sourceProperty,
    Object target
)
public:
LinkDescriptor^ GetLinkDescriptor(
    Object^ source, 
    String^ sourceProperty, 
    Object^ target
)
member GetLinkDescriptor : 
        source:Object * 
        sourceProperty:string * 
        target:Object -> LinkDescriptor 
public function GetLinkDescriptor(
    source : Object, 
    sourceProperty : String, 
    target : Object
) : LinkDescriptor

参数

  • sourceProperty
    类型:System.String
    source 对象上可返回相关对象的导航属性的名称。

返回值

类型:System.Data.Services.Client.LinkDescriptor
指定关系的 LinkDescriptor 实例或 nullnull 引用(在 Visual Basic 中为 Nothing)(如果该关系不存在 LinkDescriptor)。

请参阅

参考

DataServiceContext 类

System.Data.Services.Client 命名空间