Partilhar via


IConventionPropertyBuilder.HasKeyValueComparer(ValueComparer, Boolean) Método

Definição

Cuidado

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

Configura o ValueComparer a ser usado para comparações de chave para essa propriedade.

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

Parâmetros

comparer
ValueComparer

O comparador ou null para remover qualquer comparador definido anteriormente.

fromDataAnnotation
Boolean

Indica se a configuração foi especificada usando uma anotação de dados.

Retornos

A mesma instância do construtor se a configuração tiver sido aplicada, caso contrário. null

Atributos

Aplica-se a