MutablePropertyExtensions.SetAfterSaveBehavior 方法

定義

取得或設定值,指出這個屬性是否可以在實體儲存至資料庫之後修改。

如果 Throw 為 ,則會在資料庫中存在實體之後,將新值指派給這個屬性時,擲回例外狀況。

如果 Ignore 為 ,則會忽略已存在於資料庫中之實體屬性值的任何修改。

public static void SetAfterSaveBehavior (this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior? afterSaveBehavior);
static member SetAfterSaveBehavior : Microsoft.EntityFrameworkCore.Metadata.IMutableProperty * Nullable<Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior> -> unit
<Extension()>
Public Sub SetAfterSaveBehavior (property As IMutableProperty, afterSaveBehavior As Nullable(Of PropertySaveBehavior))

參數

property
IMutableProperty

屬性。

afterSaveBehavior
Nullable<PropertySaveBehavior>

值,指出實體儲存至資料庫之後,是否可以修改這個屬性。

適用於