語言

ConventionAnnotatable.IConventionAnnotatable.AddAnnotation 方法

定義

為此物件新增註解。 如果已有指定名稱的註解存在,則會拋出。

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

參數

name
String

要加入的註解名稱。

value
Object

註解中要儲存的值。

fromDataAnnotation
Boolean

表示配置是否以資料註解方式指定。

傳回

新加入的註解。

實作

屬性

適用於