IProperty.BeforeSaveBehavior Property

Definition

Gets a value indicating whether or not this property can be modified before the entity is saved to the database.

If Throw, then an exception will be thrown if a value is assigned to this property when it is in the Added state.

If Ignore, then any value set will be ignored when it is in the Added state.

C#
public Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior BeforeSaveBehavior { get; }

Property Value

Applies to

Product Versions
Entity Framework Core 2.0, 2.1, 2.2