Delen via


IConventionPropertyBuilder.AfterSave Method

Definition

Configures whether this property can be modified after the entity is saved to the database.

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder AfterSave (Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior? behavior, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder? AfterSave (Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior? behavior, bool fromDataAnnotation = false);
abstract member AfterSave : Nullable<Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder
Public Function AfterSave (behavior As Nullable(Of PropertySaveBehavior), Optional fromDataAnnotation As Boolean = false) As IConventionPropertyBuilder

Parameters

behavior
Nullable<PropertySaveBehavior>

Sets a value indicating whether this property can be modified after the entity is saved to the database. null to reset to default.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The same builder instance if the configuration was applied, null otherwise.

Applies to