OrganizationServiceContext Members
Applies To: Microsoft Dynamics CRM 2013, Microsoft Dynamics CRM Online
Represents the runtime context of the data service that is used to track Microsoft Dynamics CRM entities and that sends and receives entities from the server.
The following tables list the members exposed by the OrganizationServiceContext type.
Public Constructors
Name | Description | |
---|---|---|
OrganizationServiceContext | Creates a new instance of the OrganizationServiceContext class. |
Top
Public Properties
(see also Protected Properties)
Name | Description | |
---|---|---|
MergeOption | Gets or sets the synchronization option for receiving entities from the Web service. | |
SaveChangesDefaultOptions | Gets or sets the SaveChangesOptions values that are used by the SaveChanges(SaveChangesOptions) method. |
Top
Protected Properties
Name | Description | |
---|---|---|
QueryProvider | Gets the query provider. |
Top
Public Methods
(see also Protected Methods)
Name | Description | |
---|---|---|
AddLink | Adds the specified link to the set of objects the OrganizationServiceContext is tracking. | |
AddObject | Adds the specified entity to the set of entities that the OrganizationServiceContext is tracking. | |
AddRelatedObject | Adds a related entity to the OrganizationServiceContext and creates the link that defines the relationship between the two entities in a single request. | |
Attach | Notifies the OrganizationServiceContext to start tracking the specified entity. | |
AttachLink | Notifies the OrganizationServiceContext to start tracking the specified link that defines a relationship between entity objects. | |
ClearChanges | Clears all tracking of entities by the OrganizationServiceContext. | |
CreateQuery | Overloaded. Creates a web service .NET Language-Integrated Query (LINQ) query for the specified entity. | |
DeleteLink | Changes the state of the link to deleted in the list of links being tracked by the OrganizationServiceContext. | |
DeleteObject | Overloaded. Changes the state of the specified entity to be deleted in the OrganizationServiceContext. | |
Detach | Overloaded. Removes the entity from the set of entities that the OrganizationServiceContext is tracking. | |
DetachLink | Removes the specified link from the list of links being tracked by the OrganizationServiceContext. | |
Dispose | Overloaded. Disposes of the service context. | |
Equals | (inherited from Object) | |
Execute | Executes a message in the form of a request, and returns a response. | |
GetAttachedEntities | Gets an enumerable collection of the entities attached to the OrganizationServiceContext. | |
GetHashCode | (inherited from Object) | |
GetType | (inherited from Object) | |
IsAttached | Overloaded. Determines whether an entity or an entity relationship is attached and therefore being tracked by the OrganizationServiceContext. | |
IsDeleted | Overloaded. Determines whether an entity or an entity relationship has been deleted. | |
LoadProperty | Overloaded. Loads deferred content for a specified property from the web service. | |
SaveChanges | Overloaded. Saves the changes that the OrganizationServiceContext is tracking to Microsoft Dynamics CRM. | |
ToString | (inherited from Object) | |
UpdateObject | Overloaded. Changes the state of the specified entity in the OrganizationServiceContext to Modified. |
Top
Protected Methods
Name | Description | |
---|---|---|
CreateQuery | Overloaded. Creates a web service .NET Language-Integrated Query (LINQ) query for the specified entity. | |
Dispose | Overloaded. Disposes of the service context. | |
Finalize | Overridden. Destructor for the OrganizationServiceContext class. | |
MemberwiseClone | (inherited from Object) | |
OnBeginEntityTracking | Virtual (Overridable) method called when entity tracking begins. | |
OnBeginLinkTracking | Virtual (Overridable) method called when link tracking begins. | |
OnEndEntityTracking | Virtual (Overridable) method called after entity tracking ends. | |
OnEndLinkTracking | Virtual (Overridable) method called after link tracking ends. | |
OnExecute | Overloaded. Virtual (Overridable) methods called after Execute is called. | |
OnExecuting | Virtual (Overridable) method called before Execute is called. | |
OnSaveChanges | Virtual (Overridable) method called after an attempt to save data changes. | |
OnSavingChanges | Virtual (Overridable) method called before an attempt to save changes is performed. |
Top
See Also
Reference
OrganizationServiceContext Class
Microsoft.Xrm.Sdk.Client Namespace
Other Resources
Create Early-Bound Entity Classes with the Code Generation Tool (CrmSvcUtil.exe)
Use the Early Bound Entity Classes for Create, Update, and Delete
Use the Early Bound Entity Classes to Add or Update Associations Between Related Records
Sample: Use the Organization Service Context
Send comments about this topic to Microsoft.
© 2013 Microsoft Corporation. All rights reserved.