ConventionPropertyExtensions.SetValueComparer 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定這個屬性的自訂 ValueComparer 。
public static void SetValueComparer (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer comparer, bool fromDataAnnotation = false);
public static Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer SetValueComparer (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer comparer, bool fromDataAnnotation = false);
static member SetValueComparer : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer * bool -> unit
static member SetValueComparer : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer * bool -> Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer
<Extension()>
Public Sub SetValueComparer (property As IConventionProperty, comparer As ValueComparer, Optional fromDataAnnotation As Boolean = false)
<Extension()>
Public Function SetValueComparer (property As IConventionProperty, comparer As ValueComparer, Optional fromDataAnnotation As Boolean = false) As ValueComparer
參數
- property
- IConventionProperty
屬性。
- comparer
- ValueComparer
比較子,或 null
移除任何先前設定的比較子。
- fromDataAnnotation
- Boolean
指出是否使用資料批註來指定組態。
傳回
已設定的值。