ValueComparer.CreateDefault Method

Definition

Overloads

CreateDefault(Type, Boolean)

Creates a default ValueComparer<T> for the given type.

CreateDefault<T>(Boolean)

Creates a default ValueComparer<T> for the given type.

CreateDefault(Type, Boolean)

Creates a default ValueComparer<T> for the given type.

public static Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer CreateDefault (Type type, bool favorStructuralComparisons);
static member CreateDefault : Type * bool -> Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer
Public Shared Function CreateDefault (type As Type, favorStructuralComparisons As Boolean) As ValueComparer

Parameters

type
Type

The type.

favorStructuralComparisons
Boolean

If true, then EF will use IStructuralEquatable if the type implements it. This is usually used when byte arrays act as keys.

Returns

The ValueComparer<T>.

Applies to

CreateDefault<T>(Boolean)

Creates a default ValueComparer<T> for the given type.

public static Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer CreateDefault<T> (bool favorStructuralComparisons);
static member CreateDefault : bool -> Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer
Public Shared Function CreateDefault(Of T) (favorStructuralComparisons As Boolean) As ValueComparer

Type Parameters

T

The type.

Parameters

favorStructuralComparisons
Boolean

If true, then EF will use IStructuralEquatable if the type implements it. This is usually used when byte arrays act as keys.

Returns

The ValueComparer<T>.

Applies to