SaveChangesOptions SaveChangesOptions SaveChangesOptions SaveChangesOptions Enum

Definition

Indicates change options when SaveChanges() is called.

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

public enum class SaveChangesOptions
[System.Flags]
public enum SaveChangesOptions
type SaveChangesOptions = 
Public Enum SaveChangesOptions
Inheritance
SaveChangesOptionsSaveChangesOptionsSaveChangesOptionsSaveChangesOptions
Attributes

Fields

Batch Batch Batch Batch 1

All pending changes are saved in a single batch request.

ContinueOnError ContinueOnError ContinueOnError ContinueOnError 2

Pending changes are saved by using multiple requests to the server, and the operation continues after an error occurs.

None None None None 0

Pending changes are saved by using multiple requests to the server, but the operation stops on the first failure (default).

ReplaceOnUpdate ReplaceOnUpdate ReplaceOnUpdate ReplaceOnUpdate 4

Pending updates are made by replacing all values of the entity in the data source with values from the updated entity (HTTP PUT) instead of just updating changed values (HTTP MERGE), which is the default behavior.

Remarks

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 BatchHeaders instance returns an empty collection and the BatchStatusCode property is zero.

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

Applies to

See also