Sdílet prostřednictvím


SaveOptions.ForceValidation Property

Definition

Gets or sets an indication if validation is forced in the SaveChanges.

public bool ForceValidation { get; set; }
member this.ForceValidation : bool with get, set
Public Property ForceValidation As Boolean

Property Value

True, if validation is forced; otherwise, false.

Remarks

When this option is enabled, forcing a validation of any changes that were already saved to the server, but are still pending to be commited, is done by sending SequencePoint command. If the model has any pending local changes, they will be also sent along with SequencePoint command.

This flag can only be used inside a transaction, as any operation outside a transaction will cause implicit transaction to be created and committed on Server, which will trigger the validation anyway.

Applies to