IConventionPropertyBuilder.CanSetKeyValueComparer 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
Use CanSetValueComparer. Only a single value comparer is allowed for a given property.
傳回值,指出是否可以從目前的組態來源為這個屬性設定指定的 ValueComparer 。
public bool CanSetKeyValueComparer (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 CanSetKeyValueComparer (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 CanSetKeyValueComparer (Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer? comparer, bool fromDataAnnotation = false);
abstract member CanSetKeyValueComparer : Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer * bool -> bool
[<System.Obsolete("Use CanSetValueComparer. Only a single value comparer is allowed for a given property.")>]
abstract member CanSetKeyValueComparer : Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer * bool -> bool
Public Function CanSetKeyValueComparer (comparer As ValueComparer, Optional fromDataAnnotation As Boolean = false) As Boolean
參數
- comparer
- ValueComparer
比較子,或 null
移除任何先前設定的比較子。
- fromDataAnnotation
- Boolean
指出是否使用資料批註來指定組態。
傳回
true
如果指定 ValueComparer 可以針對這個屬性進行設定,則為 。
- 屬性