ConventionAnnotatable.SetOrRemoveAnnotation 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
利用給定的設定來源,將該物件的註解設定為特定的鍵與值。
若已有指定名稱的註解存在且 value 為 null,則移除現有註解。
public virtual Microsoft.EntityFrameworkCore.Metadata.Internal.ConventionAnnotation? SetOrRemoveAnnotation(string name, object? value, Microsoft.EntityFrameworkCore.Metadata.ConfigurationSource configurationSource);
abstract member SetOrRemoveAnnotation : string * obj * Microsoft.EntityFrameworkCore.Metadata.ConfigurationSource -> Microsoft.EntityFrameworkCore.Metadata.Internal.ConventionAnnotation
override this.SetOrRemoveAnnotation : string * obj * Microsoft.EntityFrameworkCore.Metadata.ConfigurationSource -> Microsoft.EntityFrameworkCore.Metadata.Internal.ConventionAnnotation
Public Overridable Function SetOrRemoveAnnotation (name As String, value As Object, configurationSource As ConfigurationSource) As ConventionAnnotation
參數
- name
- String
註解的鍵要加入。
- value
- Object
註解中要儲存的值。
- configurationSource
- ConfigurationSource
要設定的註解的配置來源。
傳回
Microsoft.EntityFrameworkCore.Metadata.Internal.ConventionAnnotation
新的註解。