Share via


ConventionAnnotatable.IConventionAnnotatable.SetAnnotation 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à.

[System.Diagnostics.DebuggerStepThrough]
Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotation IConventionAnnotatable.SetAnnotation (string name, object value, bool fromDataAnnotation);
[System.Diagnostics.DebuggerStepThrough]
Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotation? IConventionAnnotatable.SetAnnotation (string name, object? value, bool fromDataAnnotation);
[<System.Diagnostics.DebuggerStepThrough>]
abstract member Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable.SetAnnotation : string * obj * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotation
override this.Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable.SetAnnotation : string * obj * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotation
Function SetAnnotation (name As String, value As Object, fromDataAnnotation As Boolean) As IConventionAnnotation Implements IConventionAnnotatable.SetAnnotation

Paramètres

name
String

Nom de l’annotation à définir.

value
Object

Valeur à stocker dans l’annotation.

fromDataAnnotation
Boolean

Indique si la configuration a été spécifiée à l’aide d’une annotation de données.

Retours

Nouvelle annotation.

Implémente

Attributs

S’applique à