語言

AnnotatableBuilder<TMetadata,TModelBuilder>.IConventionAnnotatableBuilder.HasNonNullAnnotation 方法

定義

設定以名字儲存的註解。 若已有指定名稱的註解存在相同或更低 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 An 繼續設定,若註解已設定或移除null,否則。

實作

屬性

適用於