MutableAnnotatableExtensions.SetOrRemoveAnnotation Méthode

Définition

Définit l’annotation stockée sous le nom donné. Remplace l’annotation existante si une annotation portant le nom spécifié existe déjà. Supprime l’annotation existante si null est fournie.

C#
public static void SetOrRemoveAnnotation (this Microsoft.EntityFrameworkCore.Metadata.IMutableAnnotatable annotatable, string name, object value);

Paramètres

annotatable
IMutableAnnotatable

Objet pour lequel définir l’annotation.

name
String

Nom de l’annotation à ajouter.

value
Object

Valeur à stocker dans l’annotation.

S’applique à

Produit Versions
Entity Framework Core 3.0, 3.1, 5.0