DataServiceContext.DetachLink(Object, String, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Removes the specified link from the list of links being tracked by the DataServiceContext.
public:
bool DetachLink(System::Object ^ source, System::String ^ sourceProperty, System::Object ^ target);
public bool DetachLink (object source, string sourceProperty, object target);
member this.DetachLink : obj * string * obj -> bool
Public Function DetachLink (source As Object, sourceProperty As String, target As Object) As Boolean
Parameters
- source
- Object
The source object participating in the link to be marked for deletion.
- sourceProperty
- String
The name of the property on the source object that represents the source in the link between the source and the target.
- target
- Object
The target object involved in the link that is bound to the source object. The target object must be of the type identified by the source property or a subtype.
Returns
Returns true if the specified entity was detached; otherwise false
.
Exceptions
When source
or sourceProperty
is null
.
When sourceProperty
is an empty string.
Remarks
Any link being tracked by the DataServiceContext, regardless of its current state, can be detached.