Table of Contents

Enum PropertySaveBehavior

Namespace
Microsoft.EntityFrameworkCore.Metadata
Assembly
Microsoft.EntityFrameworkCore.dll

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

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.