PropertyExtensions.GetBeforeSaveBehavior(IProperty) 方法

定义

注意

Use IReadOnlyProperty.GetBeforeSaveBehavior

获取一个值,该值指示在实体保存到数据库之前是否可以修改此属性。

如果 Throw为 ,则如果在此属性处于 Added 状态时向此属性赋值,则会引发异常。

如果 Ignore为 ,则在处于 状态时 Added ,将忽略设置的任何值。

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

参数

property
IProperty

属性。

返回

属性

适用于