Прочетете на английски

Споделяне чрез


MutablePropertyExtensions.SetKeyValueComparer Method

Definition

Caution

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

Sets the custom ValueComparer for this property when performing key comparisons.

C#
public static void SetKeyValueComparer (this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer comparer);
C#
[System.Obsolete("Use SetValueComparer. Only a single value comparer is allowed for a given property.")]
public static void SetKeyValueComparer (this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer comparer);
C#
[System.Obsolete("Use SetValueComparer. Only a single value comparer is allowed for a given property.")]
public static void SetKeyValueComparer (this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer? comparer);

Parameters

property
IMutableProperty

The property.

comparer
ValueComparer

The comparer, or null to remove any previously set comparer.

Attributes

Applies to

Продукт Версии (остаряло)
Entity Framework Core 2.1, 2.2, 3.0, 3.1 (5.0, 6.0)