AnnotatableBase.SetRuntimeAnnotation 方法

定义

重载

SetRuntimeAnnotation(String, Annotation, Annotation)

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

SetRuntimeAnnotation(String, Object)

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

SetRuntimeAnnotation(String, Annotation, Annotation)

Source:
AnnotatableBase.cs
Source:
AnnotatableBase.cs
Source:
AnnotatableBase.cs
Source:
AnnotatableBase.cs

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

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

参数

name
String

要添加的批注的键。

annotation
Annotation

要设置的批注。

oldAnnotation
Annotation

要替换的批注。

返回

设置的批注。

适用于

SetRuntimeAnnotation(String, Object)

Source:
AnnotatableBase.cs
Source:
AnnotatableBase.cs
Source:
AnnotatableBase.cs
Source:
AnnotatableBase.cs

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

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

参数

name
String

要添加的批注的键。

value
Object

要存储在批注中的值。

返回

适用于