DataServiceContext.BeginSaveChanges Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
BeginSaveChanges(AsyncCallback, Object) |
Asynchronously submits the pending changes to the data service collected by the DataServiceContext since the last time changes were saved. |
BeginSaveChanges(SaveChangesOptions, AsyncCallback, Object) |
Asynchronously submits the pending changes to the data service collected by the DataServiceContext since the last time changes were saved. |
BeginSaveChanges(AsyncCallback, Object)
Asynchronously submits the pending changes to the data service collected by the DataServiceContext since the last time changes were saved.
public virtual IAsyncResult BeginSaveChanges (AsyncCallback callback, object state);
abstract member BeginSaveChanges : AsyncCallback * obj -> IAsyncResult
override this.BeginSaveChanges : AsyncCallback * obj -> IAsyncResult
Public Overridable Function BeginSaveChanges (callback As AsyncCallback, state As Object) As IAsyncResult
Parameters
- callback
- AsyncCallback
The delegate to call when the operation is completed.
- state
- Object
The user-defined state object that is used to pass context data to the callback method.
Returns
An IAsyncResult that represents the status of the asynchronous operation.
Applies to
BeginSaveChanges(SaveChangesOptions, AsyncCallback, Object)
Asynchronously submits the pending changes to the data service collected by the DataServiceContext since the last time changes were saved.
public virtual IAsyncResult BeginSaveChanges (Microsoft.OData.Client.SaveChangesOptions options, AsyncCallback callback, object state);
abstract member BeginSaveChanges : Microsoft.OData.Client.SaveChangesOptions * AsyncCallback * obj -> IAsyncResult
override this.BeginSaveChanges : Microsoft.OData.Client.SaveChangesOptions * AsyncCallback * obj -> IAsyncResult
Public Overridable Function BeginSaveChanges (options As SaveChangesOptions, callback As AsyncCallback, state As Object) As IAsyncResult
Parameters
- options
- SaveChangesOptions
A member of the SaveChangesOptions enumeration for how the client can save the pending set of changes.
- callback
- AsyncCallback
The delegate to call when the operation is completed.
- state
- Object
The user-defined state object that is used to pass context data to the callback method.
Returns
A task that represents a DataServiceResponse object that indicates the result of the batch operation.
Remarks
BeginSaveChanges will asynchronously attach identity Uri returned by server to successfully added entities. EndSaveChanges will apply updated values to entities, raise ReadingEntity events and change entity states.