Share via


AnnotatableBase.IAnnotatable.AddRuntimeAnnotation(String, Object) 方法

定义

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

Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation IAnnotatable.AddRuntimeAnnotation (string name, object? value);
Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation IAnnotatable.AddRuntimeAnnotation (string name, object value);
abstract member Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable.AddRuntimeAnnotation : string * obj -> Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation
override this.Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable.AddRuntimeAnnotation : string * obj -> Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation
Function AddRuntimeAnnotation (name As String, value As Object) As IAnnotation Implements IAnnotatable.AddRuntimeAnnotation

参数

name
String

要添加的批注的名称。

value
Object

要存储在批注中的值。

返回

新添加的批注。

实现

适用于