Duration (Pacific Standard Time):
To (Pacific Standard Time):
Impact:
  • None
User Action:
  • None

SaveChangesOptions Enumeration

Indicates change options when SaveChanges is called.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace:  System.Data.Services.Client
Assembly:  Microsoft.Data.Services.Client (in Microsoft.Data.Services.Client.dll)
<FlagsAttribute> _
Public Enumeration SaveChangesOptions
Dim instance As SaveChangesOptions
Member name Description
Batch All pending changes are saved in a single batch request.
BatchWithIndependentOperations
ContinueOnError Pending changes are saved by using multiple requests to the server, and the operation continues after an error occurs.
None Pending changes are saved by using multiple requests to the server, but the operation stops on the first failure (default).
PatchOnUpdate The PatchOnUpdate option.
ReplaceOnUpdate Pending updates are made by replacing all values of the entity in the data source with values from the updated entity.

When the ContinueOnError option is set, subsequent operations are still tried even after an error occurs.

When batching is not used, the BatchHeaders property on the DataServiceResponse instance returns an empty collection and the BatchStatusCode property is zero.

You cannot set both Batch and ContinueOnError at the same time.

By default, the WCF Data Services client issues a MERGE request to send only the updated properties to the data service. When you set the ReplaceOnUpdate option, a PUT request is instead sent that replaces the entire entity in the data service. When you set the PatchOnUpdate option, a PATCH request is sent to update only the updated properties. You cannot set both ReplaceOnUpdate and PatchOnUpdate.

The PatchOnUpdate option is only supported in version 3 of the Open Data Protocol (OData) and later versions.