共用方式為


IConventionPropertyBuilder.CanSetStructuralValueComparer 方法

定義

警告

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

傳回值,指出是否可以針對目前組態來源的這個屬性設定指定的 ValueComparer

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

參數

comparer
ValueComparer

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

fromDataAnnotation
Boolean

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

傳回

true 如果可以針對這個屬性設定指定的 ValueComparer ,則為 。

屬性

適用於