다음을 통해 공유


DataServiceContext.AttachLink 메서드

엔터티 개체 간의 관계를 정의하는 지정된 링크의 추적을 시작하도록 DataServiceContext에 알립니다.

네임스페이스:  System.Data.Services.Client
어셈블리:  Microsoft.Data.Services.Client(Microsoft.Data.Services.Client.dll)

구문

‘선언
Public Sub AttachLink ( _
    source As Object, _
    sourceProperty As String, _
    target As Object _
)
‘사용 방법
Dim instance As DataServiceContext
Dim source As Object
Dim sourceProperty As String
Dim target As Object

instance.AttachLink(source, sourceProperty, _
    target)
public void AttachLink(
    Object source,
    string sourceProperty,
    Object target
)
public:
void AttachLink(
    Object^ source, 
    String^ sourceProperty, 
    Object^ target
)
member AttachLink : 
        source:Object * 
        sourceProperty:string * 
        target:Object -> unit 
public function AttachLink(
    source : Object, 
    sourceProperty : String, 
    target : Object
)

매개 변수

  • source
    유형: System.Object
    새 링크의 원본 개체입니다.
  • sourceProperty
    유형: System.String
    원본 및 대상 개체 간의 링크를 나타내는 원본 개체의 속성 이름입니다.
  • target
    유형: System.Object
    이 호출에서 지정한 원본 개체에 바인딩된 링크의 대상 개체입니다.대상 개체는 원본 속성 또는 하위 형식으로 식별되는 형식이어야 합니다.

예외

예외 조건
ArgumentNullException

source, sourceProperty 또는 target이 null인 경우

InvalidOperationException

두 엔터티 간의 링크가 이미 있는 경우

또는

source 또는 target이 Added 또는 Deleted 상태인 경우

참고 항목

참조

DataServiceContext 클래스

System.Data.Services.Client 네임스페이스