Dela via


PropertyExtensions.GetAfterSaveBehavior(IProperty) Method

Definition

Caution

Use IReadOnlyProperty.GetAfterSaveBehavior

Gets a value indicating whether or not 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 Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior GetAfterSaveBehavior (this Microsoft.EntityFrameworkCore.Metadata.IProperty property);
[System.Obsolete("Use IReadOnlyProperty.GetAfterSaveBehavior")]
public static Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior GetAfterSaveBehavior (this Microsoft.EntityFrameworkCore.Metadata.IProperty property);
static member GetAfterSaveBehavior : Microsoft.EntityFrameworkCore.Metadata.IProperty -> Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior
[<System.Obsolete("Use IReadOnlyProperty.GetAfterSaveBehavior")>]
static member GetAfterSaveBehavior : Microsoft.EntityFrameworkCore.Metadata.IProperty -> Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior
<Extension()>
Public Function GetAfterSaveBehavior (property As IProperty) As PropertySaveBehavior

Parameters

property
IProperty

The property.

Returns

Attributes

Applies to