ConventionPropertyExtensions.SetValueComparer Method

Definition

Sets the custom ValueComparer for this property.

public static void SetValueComparer (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer comparer, bool fromDataAnnotation = false);
public static Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer SetValueComparer (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer comparer, bool fromDataAnnotation = false);
static member SetValueComparer : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer * bool -> unit
static member SetValueComparer : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer * bool -> Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer
<Extension()>
Public Sub SetValueComparer (property As IConventionProperty, comparer As ValueComparer, Optional fromDataAnnotation As Boolean = false)
<Extension()>
Public Function SetValueComparer (property As IConventionProperty, comparer As ValueComparer, Optional fromDataAnnotation As Boolean = false) As ValueComparer

Parameters

property
IConventionProperty

The property.

comparer
ValueComparer

The comparer, or null to remove any previously set comparer.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The configured value.

Applies to