Поделиться через


DataServiceContext.EndSaveChanges Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Called to complete the BeginSaveChanges operation.

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

Syntax

'Declaration
Public Function EndSaveChanges ( _
    asyncResult As IAsyncResult _
) As DataServiceResponse
public DataServiceResponse EndSaveChanges(
    IAsyncResult asyncResult
)

Parameters

  • asyncResult
    Type: System.IAsyncResult
    An IAsyncResult that represents the status of the asynchronous operation.

Return Value

Type: System.Data.Services.Client.DataServiceResponse
A DataServiceResponse object that indicates the result of the batch operation.

Remarks

The BatchStatusCode should be inspected to see the result of batch operations. Individual operation results can be retrieved on the operation objects returned by the DataServiceResponse enumerator.

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.

Examples

For examples that use the EndSaveChanges method, see Modifying and Deleting Entity Data (WCF Data Services/Silverlight).

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

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