IConventionPropertyBuilder.HasKeyValueComparer(ValueComparer, Boolean) 方法

定义

注意

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

ValueComparer 配置为用于此属性的键比较。

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

参数

comparer
ValueComparer

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

fromDataAnnotation
Boolean

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

返回

如果应用了配置,则为同一生成器实例, null 否则为 。

属性

适用于