Поделиться через


MutablePropertyExtensions.SetKeyValueComparer Метод

Определение

Внимание!

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

Задает пользовательский ValueComparer для этого свойства при сравнении ключей.

public static void SetKeyValueComparer (this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer comparer);
[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);
[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);
static member SetKeyValueComparer : Microsoft.EntityFrameworkCore.Metadata.IMutableProperty * Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer -> unit
[<System.Obsolete("Use SetValueComparer. Only a single value comparer is allowed for a given property.")>]
static member SetKeyValueComparer : Microsoft.EntityFrameworkCore.Metadata.IMutableProperty * Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer -> unit
<Extension()>
Public Sub SetKeyValueComparer (property As IMutableProperty, comparer As ValueComparer)

Параметры

property
IMutableProperty

Свойство.

comparer
ValueComparer

Средство сравнения или null , чтобы удалить любой ранее заданный компаратор.

Атрибуты

Применяется к