Share via


Annotatable.GetOrAddAnnotation(String, Object) Méthode

Définition

Ajoute une annotation à cet objet ou retourne l’annotation existante si une annotation portant le nom spécifié existe déjà.

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

Paramètres

name
String

Clé de l’annotation à ajouter.

value
Object

Valeur à stocker dans l’annotation.

Retours

Annotation existante si une annotation portant le nom spécifié existe déjà. Sinon, l’annotation qui vient d’être ajoutée.

S’applique à