共用方式為


ConventionPropertyExtensions.SetStructuralValueComparer 方法

定義

警告

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

設定此屬性之結構化複本的自訂 ValueComparer

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)

參數

property
IConventionProperty

屬性。

comparer
ValueComparer

比較子,或 null 移除任何先前設定的比較子。

fromDataAnnotation
Boolean

指出是否已使用資料批註指定組態。

屬性

適用於