共用方式為


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 執行個體,如果關聯性的 LinkDescriptor 不存在,則為 nullnull 參考 (在 Visual Basic 中為 Nothing)。

請參閱

參考

DataServiceContext 類別

System.Data.Services.Client 命名空間