IConventionPropertyBuilder.BeforeSave Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Configures whether this property can be modified before the entity is saved to the database.
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder BeforeSave (Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior? behavior, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder? BeforeSave (Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior? behavior, bool fromDataAnnotation = false);
abstract member BeforeSave : Nullable<Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder
Public Function BeforeSave (behavior As Nullable(Of PropertySaveBehavior), Optional fromDataAnnotation As Boolean = false) As IConventionPropertyBuilder
Parameters
- behavior
- Nullable<PropertySaveBehavior>
A value indicating whether this property can be modified before 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
Entity Framework