語言

MutableAnnotatableExtensions.SetOrRemoveAnnotation 方法

定義

設定以名字儲存的註解。 若已有指定名稱的註解存在,則會覆寫現有註解。 若 null 提供 則移除現有註解。

public static void SetOrRemoveAnnotation(this Microsoft.EntityFrameworkCore.Metadata.IMutableAnnotatable annotatable, string name, object value);
static member SetOrRemoveAnnotation : Microsoft.EntityFrameworkCore.Metadata.IMutableAnnotatable * string * obj -> unit
<Extension()>
Public Sub SetOrRemoveAnnotation (annotatable As IMutableAnnotatable, name As String, value As Object)

參數

annotatable
IMutableAnnotatable

要設定註解的物件。

name
String

要加入的註解名稱。

value
Object

註解中要儲存的值。

適用於