Share via


MutablePropertyExtensions.SetAfterSaveBehavior Method

Definition

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

If Throw, then an exception will be thrown if a new value is assigned to this property after the entity exists in the database.

If Ignore, then any modification to the property value of an entity that already exists in the database will be ignored.

public static void SetAfterSaveBehavior (this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior? afterSaveBehavior);
static member SetAfterSaveBehavior : Microsoft.EntityFrameworkCore.Metadata.IMutableProperty * Nullable<Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior> -> unit
<Extension()>
Public Sub SetAfterSaveBehavior (property As IMutableProperty, afterSaveBehavior As Nullable(Of PropertySaveBehavior))

Parameters

property
IMutableProperty

The property.

afterSaveBehavior
Nullable<PropertySaveBehavior>

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

Applies to