OrganizationServiceContext.Attach(Entity) Method

Definition

Notifies the OrganizationServiceContext to start tracking the specified entity.

public:
 void Attach(Microsoft::Xrm::Sdk::Entity ^ entity);
public void Attach (Microsoft.Xrm.Sdk.Entity entity);
member this.Attach : Microsoft.Xrm.Sdk.Entity -> unit
Public Sub Attach (entity As Entity)

Parameters

entity
Entity

Type: Entity. The entity to be tracked.

Remarks

If the entity is part of an object graph, this operation does not traverse the graph to add related objects. It is a shallow operation.The method does not validate whether the specified entity set occurs in the Web service associated with the OrganizationServiceContext.

Applies to