AnnotatableBase.AddRuntimeAnnotation Method

Definition

Overloads

AddRuntimeAnnotation(String, Annotation)

Adds a runtime annotation to this object. Throws if an annotation with the specified name already exists.

AddRuntimeAnnotation(String, Object)

Adds a runtime annotation to this object. Throws if an annotation with the specified name already exists.

AddRuntimeAnnotation(String, Annotation)

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

Adds a runtime annotation to this object. Throws if an annotation with the specified name already exists.

C#
protected virtual Microsoft.EntityFrameworkCore.Infrastructure.Annotation AddRuntimeAnnotation (string name, Microsoft.EntityFrameworkCore.Infrastructure.Annotation annotation);

Parameters

name
String

The key of the annotation to be added.

annotation
Annotation

The annotation to be added.

Returns

The added annotation.

Applies to

Entity Framework Core 9.0 and other versions
Product Versions
Entity Framework Core 6.0, 7.0, 8.0, 9.0

AddRuntimeAnnotation(String, Object)

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

Adds a runtime annotation to this object. Throws if an annotation with the specified name already exists.

C#
public virtual Microsoft.EntityFrameworkCore.Infrastructure.Annotation AddRuntimeAnnotation (string name, object? value);

Parameters

name
String

The key of the annotation to be added.

value
Object

The value to be stored in the annotation.

Returns

The newly added annotation.

Applies to

Entity Framework Core 9.0 and other versions
Product Versions
Entity Framework Core 6.0, 7.0, 8.0, 9.0