语言

RuntimeAnnotatableBase.SetRuntimeAnnotation 方法

定义

重载

名称 说明
SetRuntimeAnnotation(String, Object)

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

SetRuntimeAnnotation(String, Annotation, Annotation)

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

SetRuntimeAnnotation(String, Object)

Source:
RuntimeAnnotatableBase.cs
Source:
RuntimeAnnotatableBase.cs
Source:
RuntimeAnnotatableBase.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

要存储在批注中的值。

返回

适用于

SetRuntimeAnnotation(String, Annotation, Annotation)

Source:
RuntimeAnnotatableBase.cs
Source:
RuntimeAnnotatableBase.cs
Source:
RuntimeAnnotatableBase.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

正在替换的批注。

返回

已设置的批注。

适用于