共用方式為


AnnotatableBase.AddRuntimeAnnotation 方法

定義

多載

AddRuntimeAnnotation(String, Annotation)

將執行時間批註新增至這個 物件。 如果具有指定名稱的注釋已經存在,則會擲回 。

AddRuntimeAnnotation(String, Object)

將執行時間批註新增至這個 物件。 如果具有指定名稱的注釋已經存在,則會擲回 。

AddRuntimeAnnotation(String, Annotation)

將執行時間批註新增至這個 物件。 如果具有指定名稱的注釋已經存在,則會擲回 。

protected virtual Microsoft.EntityFrameworkCore.Infrastructure.Annotation AddRuntimeAnnotation (string name, Microsoft.EntityFrameworkCore.Infrastructure.Annotation annotation);
abstract member AddRuntimeAnnotation : string * Microsoft.EntityFrameworkCore.Infrastructure.Annotation -> Microsoft.EntityFrameworkCore.Infrastructure.Annotation
override this.AddRuntimeAnnotation : string * Microsoft.EntityFrameworkCore.Infrastructure.Annotation -> Microsoft.EntityFrameworkCore.Infrastructure.Annotation
Protected Overridable Function AddRuntimeAnnotation (name As String, annotation As Annotation) As Annotation

參數

name
String

要加入之批註的索引鍵。

annotation
Annotation

要加入的註釋。

傳回

新增的注釋。

適用於

AddRuntimeAnnotation(String, Object)

將執行時間批註新增至這個 物件。 如果具有指定名稱的注釋已經存在,則會擲回 。

public virtual Microsoft.EntityFrameworkCore.Infrastructure.Annotation AddRuntimeAnnotation (string name, object? value);
abstract member AddRuntimeAnnotation : string * obj -> Microsoft.EntityFrameworkCore.Infrastructure.Annotation
override this.AddRuntimeAnnotation : string * obj -> Microsoft.EntityFrameworkCore.Infrastructure.Annotation
Public Overridable Function AddRuntimeAnnotation (name As String, value As Object) As Annotation

參數

name
String

要加入之批註的索引鍵。

value
Object

要儲存在注釋中的值。

傳回

新加入的注釋。

適用於