ValueComparer<T> Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies custom value snapshotting and comparison for CLR types that cannot be compared with Equals(Object, Object) and/or need a deep copy when taking a snapshot. For example, arrays of primitive types will require both if mutation is to be detected.
public class ValueComparer<T> : Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer, System.Collections.Generic.IEqualityComparer<T>
type ValueComparer<'T> = class
inherit ValueComparer
interface IEqualityComparer<'T>
Public Class ValueComparer(Of T)
Inherits ValueComparer
Implements IEqualityComparer(Of T)
- T
The type.
- Inheritance
- Derived
- Implements
Snapshotting is the process of creating a copy of the value into a snapshot so it can later be compared to determine if it has changed. For some types, such as collections, this needs to be a deep copy of the collection rather than just a shallow copy of the reference.
See EF Core value comparers for more information and examples.
Value |
Creates a new ValueComparer<T> with a default comparison expression and a shallow copy for the snapshot. |
Value |
Creates a new ValueComparer<T> with the given comparison and snapshotting expressions. |
Value |
Creates a new ValueComparer<T> with the given comparison expression. A shallow copy will be used for the snapshot. |
Constructor |
The expression representing construction of this object. |
Constructor |
The expression representing construction of this object. (Inherited from ValueComparer) |
Equals |
The comparison expression. |
Hash |
The hash code expression. |
Object |
The object comparison expression. |
Object |
The object comparison expression. (Inherited from ValueComparer) |
Snapshot |
The snapshot expression. |
Type |
The type. |
Create |
Creates an expression for equality. |
Create |
Creates an expression for generating a hash code. |
Create |
Creates an expression for creating a snapshot of a value. |
Equals(Object, Object) |
Compares the two instances to determine if they are equal. |
Equals(T, T) |
Compares the two instances to determine if they are equal. |
Extract |
Takes EqualsExpression and replaces the two parameters with the given expressions, returning the transformed body. (Inherited from ValueComparer) |
Extract |
Takes the HashCodeExpression and replaces the parameter with the given expression, returning the transformed body. (Inherited from ValueComparer) |
Extract |
Takes the SnapshotExpression and replaces the parameter with the given expression, returning the transformed body. (Inherited from ValueComparer) |
Get |
Returns the hash code for the given instance. |
Get |
Returns the hash code for the given instance. |
Snapshot(Object) |
Creates a snapshot of the given instance. |
Snapshot(T) |
Creates a snapshot of the given instance. |
Is |
Returns |
Proizvod | Verzije |
---|---|
Entity Framework Core | 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0 |
Povratne informacije o proizvodu Entity Framework
Entity Framework je projekt otvorenog koda. Odaberite vezu za slanje povratnih informacija: