IConventionPropertyBuilder.CanSetKeyValueComparer Method
Definition
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.
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 CanSetKeyValueComparer (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 CanSetKeyValueComparer (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 CanSetKeyValueComparer (Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer? comparer, bool fromDataAnnotation = false);
abstract member CanSetKeyValueComparer : Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer * bool -> bool
[<System.Obsolete("Use CanSetValueComparer. Only a single value comparer is allowed for a given property.")>]
abstract member CanSetKeyValueComparer : Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer * bool -> bool
Public Function CanSetKeyValueComparer (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
Entity Framework