IMutableProperty.SetAfterSaveBehavior 方法

定義

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

public void SetAfterSaveBehavior (Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior? afterSaveBehavior);
abstract member SetAfterSaveBehavior : Nullable<Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior> -> unit
Public Sub SetAfterSaveBehavior (afterSaveBehavior As Nullable(Of PropertySaveBehavior))

參數

afterSaveBehavior
Nullable<PropertySaveBehavior>

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

備註

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

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

適用於