PropertySaveBehavior Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Ignore | 1 | Any value set or changed will be ignored. |
Save | 0 | The value set or changed will be sent to the database in the normal way. |
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
Entity Framework