DataServiceContext.BeginSaveChanges Method (AsyncCallback, Object)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Asynchronously submits the pending changes to the data service collected by the DataServiceContext since the last time changes were saved.

Namespace:   System.Data.Services.Client
Assembly:  System.Data.Services.Client (in System.Data.Services.Client.dll)

public IAsyncResult BeginSaveChanges(
	AsyncCallback callback,
	object state
)

Parameters

callback
Type: System.AsyncCallback

The delegate to call when the operation is completed.

state
Type: System.Object

The user-defined state object that is used to pass context data to the callback method.

Return Value

Type: System.IAsyncResult

An IAsyncResult that represents the status of the asynchronous operation.

Changes are added to the DataServiceContext by calling the AddObject, AddLink, AttachTo, AttachLink, DeleteObject, DeleteLink, Detach, or DetachLink.

Changes are sent to the data service, as with the SaveChanges method, one change operation per HTTP request.

If an error occurs while processing an operation, no additional operations are processed by the data service. Instead, a response is generated telling the client what operations were executed, the results, and which operations were not tried because of an error.

.NET Framework
Available since 3.5
Silverlight
Available since 2.0
Return to top
Show: