語言

EntryCurrentValueComparer<TProperty> 類別

定義

一種實 IComparer<T> 作,並 IEqualityComparer<T> 比較內部追蹤實體中包含 IUpdateEntry 的當前數值。

此類型通常由資料庫提供者(及其他擴充功能)使用。 它通常不被用於應用程式程式碼中。

[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 價值比較工具 。

建構函式

名稱 Description
EntryCurrentValueComparer<TProperty>(IPropertyBase)

使用屬性類型的預設比較器建立一個新 Microsoft.EntityFrameworkCore.ChangeTracking.Internal.EntryCurrentValueComparer 實例。

方法

名稱 Description
Compare(IUpdateEntry, IUpdateEntry)

比較兩個物件,並回傳一個值,表示其中一個小於、等於或大於另一個。

Equals(IUpdateEntry, IUpdateEntry)

判斷指定物件是否相等。

GetHashCode(IUpdateEntry)

會回傳指定物件的雜湊碼。

適用於