Επεξεργασία

Κοινή χρήση μέσω


DataServiceContext.AttachLink(Object, String, Object) Method

Definition

Notifies the DataServiceContext to start tracking the specified link that defines a relationship between entity objects.

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)

Parameters

source
Object

The source object in the new link.

sourceProperty
String

The name of the property on the source object that represents the link between the source and target object.

target
Object

The target object in the link that is bound to the source object specified in this call. The target object must be of the type identified by the source property or a subtype.

Exceptions

source, sourceProperty, or target is null.

The link between the two entities already exists.

-or-

source or target is in an Added or Deleted state.

Applies to