ConventionPropertyExtensions.SetKeyValueComparer Methode

Definition

Achtung

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

Legt die benutzerdefinierte ValueComparer für diese Eigenschaft fest, wenn Schlüsselvergleiche durchgeführt werden.

C#
public static void SetKeyValueComparer (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer comparer, bool fromDataAnnotation = false);
C#
[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);
C#
[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);

Parameter

property
IConventionProperty

Die Eigenschaft.

comparer
ValueComparer

Der Vergleich oder null , um alle zuvor festgelegten Vergleiche zu entfernen.

fromDataAnnotation
Boolean

Gibt an, ob die Konfiguration mithilfe einer Datenanmerkung angegeben wurde.

Attribute

Gilt für:

Produkt Versionen (Veraltet)
Entity Framework Core 3.0, 3.1 (5.0, 6.0)