Condividi tramite


PropertySaveBehavior Enum

Definition

Indicates how changes to the value of a property will be handled by Entity Framework change tracking which in turn will determine whether the value set is sent to the database or not. Used with GetBeforeSaveBehavior() and GetAfterSaveBehavior()

public enum PropertySaveBehavior
type PropertySaveBehavior = 
Public Enum PropertySaveBehavior
Inheritance
PropertySaveBehavior

Fields

Name Value Description
Save 0

The value set or changed will be sent to the database in the normal way.

Ignore 1

Any value set or changed will be ignored.

Throw 2

If an explicit value is set or the value is changed, then an exception will be thrown.

Remarks

See Modeling entity types and relationships and Saving data in EF Core for more information and examples.

Applies to