Share via


IConventionPropertyBuilder.CanSetStructuralValueComparer Method

Definition

Caution

Use CanSetValueComparer. Only a single value comparer is allowed for a given property.

Returns a value indicating whether the given ValueComparer can be configured for this property from the current configuration source.

public bool CanSetStructuralValueComparer (Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer comparer, bool fromDataAnnotation = false);
[System.Obsolete("Use CanSetValueComparer. Only a single value comparer is allowed for a given property.")]
public bool CanSetStructuralValueComparer (Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer comparer, bool fromDataAnnotation = false);
[System.Obsolete("Use CanSetValueComparer. Only a single value comparer is allowed for a given property.")]
public bool CanSetStructuralValueComparer (Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer? comparer, bool fromDataAnnotation = false);
abstract member CanSetStructuralValueComparer : Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer * bool -> bool
[<System.Obsolete("Use CanSetValueComparer. Only a single value comparer is allowed for a given property.")>]
abstract member CanSetStructuralValueComparer : Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer * bool -> bool
Public Function CanSetStructuralValueComparer (comparer As ValueComparer, Optional fromDataAnnotation As Boolean = false) As Boolean

Parameters

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

true if the given ValueComparer can be configured for this property.

Attributes

Applies to