Partager via


ConventionPropertyExtensions.SetKeyValueComparer Méthode

Définition

Attention

Use SetValueComparer. Only a single value comparer is allowed for a given property.

Définit la valeur personnalisée ValueComparer pour cette propriété lors de l’exécution de comparaisons de clés.

public static void SetKeyValueComparer (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer comparer, bool fromDataAnnotation = false);
[System.Obsolete("Use SetValueComparer. Only a single value comparer is allowed for a given property.")]
public static void SetKeyValueComparer (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer comparer, bool fromDataAnnotation = false);
[System.Obsolete("Use SetValueComparer. Only a single value comparer is allowed for a given property.")]
public static void SetKeyValueComparer (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer? comparer, bool fromDataAnnotation = false);
static member SetKeyValueComparer : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer * bool -> unit
[<System.Obsolete("Use SetValueComparer. Only a single value comparer is allowed for a given property.")>]
static member SetKeyValueComparer : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer * bool -> unit
<Extension()>
Public Sub SetKeyValueComparer (property As IConventionProperty, comparer As ValueComparer, Optional fromDataAnnotation As Boolean = false)

Paramètres

property
IConventionProperty

Propriété.

comparer
ValueComparer

Comparateur ou null pour supprimer tout comparateur précédemment défini.

fromDataAnnotation
Boolean

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

Attributs

S’applique à