IConventionPropertyBuilder.HasKeyValueComparer(ValueComparer, Boolean) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
Use HasValueComparer. Only a single value comparer is allowed for a given property.
設定 ValueComparer 要用於此屬性之索引鍵比較的 。
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder HasKeyValueComparer (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 HasKeyValueComparer (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? HasKeyValueComparer (Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer? comparer, bool fromDataAnnotation = false);
abstract member HasKeyValueComparer : 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 HasKeyValueComparer : Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder
Public Function HasKeyValueComparer (comparer As ValueComparer, Optional fromDataAnnotation As Boolean = false) As IConventionPropertyBuilder
參數
- comparer
- ValueComparer
比較子,或 null
移除任何先前設定的比較子。
- fromDataAnnotation
- Boolean
指出是否已使用資料批註指定組態。
傳回
如果已套用組態,則為相同的產生器實例, null
否則為 。
- 屬性