DataServiceContext.AttachLink(Object, String, Object) メソッド

定義

エンティティ オブジェクト間のリレーションシップを定義する指定したリンクの追跡を開始するように DataServiceContext に通知します。

public:
 void AttachLink(System::Object ^ source, System::String ^ sourceProperty, System::Object ^ target);
public void AttachLink(object source, string sourceProperty, object target);
member this.AttachLink : obj * string * obj -> unit
Public Sub AttachLink (source As Object, sourceProperty As String, target As Object)

パラメーター

source
Object

新しいリンク内のソース オブジェクト。

sourceProperty
String

ソース オブジェクトとターゲット オブジェクトの間のリンクを表すソース オブジェクトのプロパティの名前。

target
Object

この呼び出しで指定されたソース オブジェクトにバインドされているリンク内のターゲット オブジェクト。 ターゲット オブジェクトは、ソース プロパティまたはサブタイプによって識別される型である必要があります。

例外

sourcesourceProperty、または target が null です。

2 つのエンティティ間のリンクは既に存在します。

-または-

source または targetAdded または Deleted 状態です。

適用対象