语言

RuntimeAnnotatableBase.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

要存储在批注中的值。

返回

新添加的批注。

适用于