DataServiceContext.BeginSaveChanges Method (SaveChangesOptions, AsyncCallback, Object)

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 Function BeginSaveChanges ( _
	options As SaveChangesOptions, _
	callback As AsyncCallback, _
	state As Object _
) As IAsyncResult


Type: System.Data.Services.Client.SaveChangesOptions
The options for how the client can save the pending set of changes. For more information, see SaveChangesOptions.
Type: System.AsyncCallback
The delegate to call when the operation finishes.
Type: System.Object
The user-defined state object 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 methods.

The flags set on the SaveChangesOptions object passed to the options parameter determine the behaviors during the BeginSaveChanges operation.

You must use the BeginInvoke method of the Dispatcher class to correctly marshal the response operation back to the main application thread (the UI thread) of your Silverlight-based application. For more information, see Synchronizing Data for Multithreading.


Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions