ValueComparer.CreateDefault 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| CreateDefault(Type, Boolean) |
為該類型建立預設 ValueComparer<T> 值。 |
| CreateDefault<T>(Boolean) |
為該類型建立預設 ValueComparer<T> 值。 |
CreateDefault(Type, Boolean)
為該類型建立預設 ValueComparer<T> 值。
public static Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer CreateDefault(Type type, bool favorStructuralComparisons);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Creating a default value comparer for the given type requires calling MakeGenericMethod, which is not compatible with NativeAOT. Use the generic CreateDefault<T> overload instead.")]
public static Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer CreateDefault(Type type, bool favorStructuralComparisons);
static member CreateDefault : Type * bool -> Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Creating a default value comparer for the given type requires calling MakeGenericMethod, which is not compatible with NativeAOT. Use the generic CreateDefault<T> overload instead.")>]
static member CreateDefault : Type * bool -> Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer
Public Shared Function CreateDefault (type As Type, favorStructuralComparisons As Boolean) As ValueComparer
參數
- type
- Type
「類型」。
- favorStructuralComparisons
- Boolean
若 true,則 EF 會使用 IStructuralEquatable ,若型別實作了它。 這通常用於位元組陣列作為鍵時。
傳回
- 屬性
適用於
CreateDefault<T>(Boolean)
為該類型建立預設 ValueComparer<T> 值。
public static Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer CreateDefault<T>(bool favorStructuralComparisons);
static member CreateDefault : bool -> Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer
Public Shared Function CreateDefault(Of T) (favorStructuralComparisons As Boolean) As ValueComparer
類型參數
- T
「類型」。
參數
- favorStructuralComparisons
- Boolean
若 true,則 EF 會使用 IStructuralEquatable ,若型別實作了它。 這通常用於位元組陣列作為鍵時。