ConventionAnnotatable.IConventionAnnotatable.SetOrRemoveAnnotation 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定以名字儲存的註解。 若已有指定名稱的註解存在,則會覆寫現有註解。 若 null 提供 則移除現有註解。
[System.Diagnostics.DebuggerStepThrough]
Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotation IConventionAnnotatable.SetOrRemoveAnnotation(string name, object value, bool fromDataAnnotation);
[System.Diagnostics.DebuggerStepThrough]
Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotation? IConventionAnnotatable.SetOrRemoveAnnotation(string name, object? value, bool fromDataAnnotation);
[<System.Diagnostics.DebuggerStepThrough>]
abstract member Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable.SetOrRemoveAnnotation : string * obj * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotation
override this.Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable.SetOrRemoveAnnotation : string * obj * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotation
Function SetOrRemoveAnnotation (name As String, value As Object, fromDataAnnotation As Boolean) As IConventionAnnotation Implements IConventionAnnotatable.SetOrRemoveAnnotation
參數
- name
- String
要加入的註解名稱。
- value
- Object
註解中要儲存的值。
- fromDataAnnotation
- Boolean
表示配置是否以資料註解方式指定。
傳回
新的註解,或者 null 是它被移除了。
實作
- 屬性