语言

EntryCurrentValueComparer<TProperty> 类

定义

内部跟踪实体中包含的IUpdateEntry当前值的实现IComparer<T>和IEqualityComparer<T>比较。

此类型通常由数据库提供程序(和其他扩展)使用。 它通常不用于应用程序代码。

[System.Runtime.CompilerServices.Nullable(0)]
public sealed class EntryCurrentValueComparer<TProperty> : System.Collections.Generic.IComparer<Microsoft.EntityFrameworkCore.Update.IUpdateEntry>, System.Collections.Generic.IEqualityComparer<Microsoft.EntityFrameworkCore.Update.IUpdateEntry>
public sealed class EntryCurrentValueComparer<TProperty> : System.Collections.Generic.IComparer<Microsoft.EntityFrameworkCore.Update.IUpdateEntry>, System.Collections.Generic.IEqualityComparer<Microsoft.EntityFrameworkCore.Update.IUpdateEntry>
[<System.Runtime.CompilerServices.Nullable(0)>]
type EntryCurrentValueComparer<'Property> = class
    interface IComparer<IUpdateEntry>
    interface IEqualityComparer<IUpdateEntry>
type EntryCurrentValueComparer<'Property> = class
    interface IComparer<IUpdateEntry>
    interface IEqualityComparer<IUpdateEntry>
Public NotInheritable Class EntryCurrentValueComparer(Of TProperty)
Implements IComparer(Of IUpdateEntry), IEqualityComparer(Of IUpdateEntry)

类型参数

TProperty

属性类型。

继承
EntryCurrentValueComparer<TProperty>
特性
实现

注解

有关详细信息和示例,请参阅 EF Core 值比较器 。

构造函数

名称 说明
EntryCurrentValueComparer<TProperty>(IPropertyBase)

使用属性类型的默认比较器创建新 Microsoft.EntityFrameworkCore.ChangeTracking.Internal.EntryCurrentValueComparer 实例。

方法

名称 说明
Compare(IUpdateEntry, IUpdateEntry)

比较两个对象并返回一个值,该值指示一个对象是小于、等于还是大于另一个对象。

Equals(IUpdateEntry, IUpdateEntry)

确定指定的对象是否相等。

GetHashCode(IUpdateEntry)

返回指定对象的哈希代码。

适用于