AnnotatableBase.AddAnnotation 方法

定义

重载

AddAnnotation(String, Annotation)

向此对象添加批注。 如果已存在具有指定名称的批注,则引发 。

AddAnnotation(String, Object)

向此对象添加批注。 如果已存在具有指定名称的批注,则引发 。

AddAnnotation(String, Annotation)

向此对象添加批注。 如果已存在具有指定名称的批注,则引发 。

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

参数

name
String

要添加的批注的键。

annotation
Annotation

要添加的批注。

返回

添加的批注。

适用于

AddAnnotation(String, Object)

向此对象添加批注。 如果已存在具有指定名称的批注,则引发 。

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

参数

name
String

要添加的批注的键。

value
Object

要存储在批注中的值。

返回

新添加的批注。

适用于