Delen via


IConventionPropertyBuilder.HasStructuralValueComparer Method

Definition

Caution

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

Configures the ValueComparer to be used for structural comparisons for this property.

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder HasStructuralValueComparer (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 HasStructuralValueComparer (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? HasStructuralValueComparer (Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer? comparer, bool fromDataAnnotation = false);
abstract member HasStructuralValueComparer : 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 HasStructuralValueComparer : Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder
Public Function HasStructuralValueComparer (comparer As ValueComparer, Optional fromDataAnnotation As Boolean = false) As IConventionPropertyBuilder

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

The same builder instance if the configuration was applied, null otherwise.

Attributes

Applies to