AnnotatableBuilder<TMetadata,TModelBuilder>.IConventionAnnotatableBuilder.HasNonNullAnnotation 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定儲存在指定名稱下的批註。 如果具有指定名稱的注釋已經存在,且相同或更低 ConfigurationSource ,則會覆寫現有的注釋。
如果 null
已指定值,則移除批註。
[System.Diagnostics.DebuggerStepThrough]
Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder IConventionAnnotatableBuilder.HasNonNullAnnotation (string name, object value, bool fromDataAnnotation);
[System.Diagnostics.DebuggerStepThrough]
Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder? IConventionAnnotatableBuilder.HasNonNullAnnotation (string name, object? value, bool fromDataAnnotation);
[<System.Diagnostics.DebuggerStepThrough>]
abstract member Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder.HasNonNullAnnotation : string * obj * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder
override this.Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder.HasNonNullAnnotation : string * obj * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder
Function HasNonNullAnnotation (name As String, value As Object, fromDataAnnotation As Boolean) As IConventionAnnotatableBuilder Implements IConventionAnnotatableBuilder.HasNonNullAnnotation
參數
- name
- String
要設定之批註的名稱。
- value
- Object
要儲存在批註中的值。
null
表示移除批註。
- fromDataAnnotation
- Boolean
指出是否使用資料批註來指定組態。
傳回
如果 IConventionAnnotatableBuilder 已設定或移除批註,則為繼續設定的 , null
否則為 。
實作
- 屬性