Delen via


PropertyExtensions.GetBeforeSaveBehavior(IProperty) Method

Definition

Caution

Use IReadOnlyProperty.GetBeforeSaveBehavior

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.

public static Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior GetBeforeSaveBehavior (this Microsoft.EntityFrameworkCore.Metadata.IProperty property);
[System.Obsolete("Use IReadOnlyProperty.GetBeforeSaveBehavior")]
public static Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior GetBeforeSaveBehavior (this Microsoft.EntityFrameworkCore.Metadata.IProperty property);
static member GetBeforeSaveBehavior : Microsoft.EntityFrameworkCore.Metadata.IProperty -> Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior
[<System.Obsolete("Use IReadOnlyProperty.GetBeforeSaveBehavior")>]
static member GetBeforeSaveBehavior : Microsoft.EntityFrameworkCore.Metadata.IProperty -> Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior
<Extension()>
Public Function GetBeforeSaveBehavior (property As IProperty) As PropertySaveBehavior

Parameters

property
IProperty

The property.

Returns

Attributes

Applies to