Share via


AnnotatableBase.SetAnnotation 方法

定义

重载

SetAnnotation(String, Annotation, Annotation)

设置存储在给定键下的批注。 如果具有指定名称的注释已存在,则覆盖现有批注。

SetAnnotation(String, Object)

设置存储在给定键下的批注。 如果具有指定名称的注释已存在,则覆盖现有批注。

SetAnnotation(String, Annotation, Annotation)

设置存储在给定键下的批注。 如果具有指定名称的注释已存在,则覆盖现有批注。

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

参数

name
String

要添加的批注的键。

annotation
Annotation

要设置的批注。

oldAnnotation
Annotation

要替换的批注。

返回

已设置的批注。

适用于

SetAnnotation(String, Object)

设置存储在给定键下的批注。 如果具有指定名称的注释已存在,则覆盖现有批注。

public virtual void SetAnnotation (string name, object? value);
abstract member SetAnnotation : string * obj -> unit
override this.SetAnnotation : string * obj -> unit
Public Overridable Sub SetAnnotation (name As String, value As Object)

参数

name
String

要添加的批注的键。

value
Object

要存储在批注中的值。

适用于