ConventionPropertyExtensions.SetStructuralValueComparer 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 SetValueComparer. Only a single value comparer is allowed for a given property.
Sets the custom ValueComparer for structural copies for this property.
public static void SetStructuralValueComparer (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer comparer, bool fromDataAnnotation = false);
[System.Obsolete("Use SetValueComparer. Only a single value comparer is allowed for a given property.")]
public static void SetStructuralValueComparer (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer comparer, bool fromDataAnnotation = false);
[System.Obsolete("Use SetValueComparer. Only a single value comparer is allowed for a given property.")]
public static void SetStructuralValueComparer (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer? comparer, bool fromDataAnnotation = false);
static member SetStructuralValueComparer : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer * bool -> unit
[<System.Obsolete("Use SetValueComparer. Only a single value comparer is allowed for a given property.")>]
static member SetStructuralValueComparer : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer * bool -> unit
<Extension()>
Public Sub SetStructuralValueComparer (property As IConventionProperty, comparer As ValueComparer, Optional fromDataAnnotation As Boolean = false)
Parameters
- property
- IConventionProperty
The property.
- comparer
- ValueComparer
The comparer, or null
to remove any previously set comparer.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
- Attributes
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Entity Framework