共用方式為


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

定義

設定儲存在指定名稱底下的批註。 如果具有指定名稱的注釋已經存在,則覆寫現有的注釋,其名稱相同或較低 ConfigurationSource

[System.Diagnostics.DebuggerStepThrough]
Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder IConventionAnnotatableBuilder.HasAnnotation (string name, object value, bool fromDataAnnotation);
[System.Diagnostics.DebuggerStepThrough]
Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder? IConventionAnnotatableBuilder.HasAnnotation (string name, object? value, bool fromDataAnnotation);
[<System.Diagnostics.DebuggerStepThrough>]
abstract member Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder.HasAnnotation : string * obj * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder
override this.Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder.HasAnnotation : string * obj * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder
Function HasAnnotation (name As String, value As Object, fromDataAnnotation As Boolean) As IConventionAnnotatableBuilder Implements IConventionAnnotatableBuilder.HasAnnotation

參數

name
String

要設定的批註名稱。

value
Object

要儲存在注釋中的值。

fromDataAnnotation
Boolean

指出是否已使用資料批註指定組態。

傳回

如果 IConventionAnnotatableBuilder 已設定批註,則為 繼續設定的 , null 否則為 。

實作

屬性

適用於