IConventionPropertyBuilder.CanSetStructuralValueComparer 方法

定义

注意

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

返回一个值,该值指示是否可以从当前配置源为此属性配置给定 ValueComparer

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

参数

comparer
ValueComparer

比较器,或者 null 删除任何以前设置的比较器。

fromDataAnnotation
Boolean

指示是否使用数据注释指定配置。

返回

true 如果可以为此属性配置给定 ValueComparer 的 ,则为 。

属性

适用于