IConventionModelBuilder.HasNonNullAnnotation(String, Object, Boolean) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定以名字儲存的註解。 若已有指定名稱的註解存在相同或更低 ConfigurationSource的標註,則會覆寫現有註解。
若指定值, null 則移除註解。
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder? HasNonNullAnnotation(string name, object? value, bool fromDataAnnotation = false);
abstract member HasNonNullAnnotation : string * obj * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder
Public Function HasNonNullAnnotation (name As String, value As Object, Optional fromDataAnnotation As Boolean = false) As IConventionModelBuilder
參數
- name
- String
要設定的註解名稱。
- value
- Object
註解中要儲存的值。
null 移除註解。
- fromDataAnnotation
- Boolean
表示配置是否以資料註解方式指定。
傳回
IConventionModelBuilder An 繼續設定,若註解已設定或移除null,否則。