Čítať v angličtine Upraviť

Zdieľať cez


SaveOptions Enum

Definition

Specifies the behavior of the object context when the SaveChanges(SaveOptions) method is called.

This enumeration supports a bitwise combination of its member values.

C#
[System.Flags]
public enum SaveOptions
Inheritance
SaveOptions
Attributes

Fields

Name Value Description
None 0

Changes are saved without the DetectChanges() or the AcceptAllChangesAfterSave methods being called.

AcceptAllChangesAfterSave 1

After changes are saved, the AcceptAllChangesAfterSave method is called, which resets change tracking in the ObjectStateManager.

DetectChangesBeforeSave 2

Before changes are saved, the DetectChanges() method is called to synchronize the property values of objects that are attached to the object context with data in the ObjectStateManager.

Applies to

Produkt Verzie
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1