IMutableAnnotatable.AddAnnotation(String, Object) 方法

定义

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

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

参数

name
String

要添加的批注的名称。

value
Object

要存储在批注中的值。

返回

新添加的批注。

适用于