Delen via


IMutableProperty.SetBeforeSaveBehavior Method

Definition

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

public void SetBeforeSaveBehavior (Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior? beforeSaveBehavior);
abstract member SetBeforeSaveBehavior : Nullable<Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior> -> unit
Public Sub SetBeforeSaveBehavior (beforeSaveBehavior As Nullable(Of PropertySaveBehavior))

Parameters

beforeSaveBehavior
Nullable<PropertySaveBehavior>

A value indicating whether this property can be modified before the entity is saved to the database.

Remarks

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.

Applies to