mirror of https://github.com/abpframework/abp.git
9 changed files with 40 additions and 27 deletions
@ -1,17 +1,17 @@ |
|||||
using System; |
using System; |
||||
using System.Collections.Generic; |
|
||||
using System.Linq; |
using System.Linq; |
||||
using Microsoft.EntityFrameworkCore.ChangeTracking; |
using Microsoft.EntityFrameworkCore.ChangeTracking; |
||||
|
using Volo.Abp.Data; |
||||
|
|
||||
namespace Volo.Abp.EntityFrameworkCore.ValueComparers |
namespace Volo.Abp.EntityFrameworkCore.ValueComparers |
||||
{ |
{ |
||||
public class AbpDictionaryValueComparer<TKey, TValue> : ValueComparer<Dictionary<TKey, TValue>> |
public class ExtraPropertyDictionaryValueComparer : ValueComparer<ExtraPropertyDictionary> |
||||
{ |
{ |
||||
public AbpDictionaryValueComparer() |
public ExtraPropertyDictionaryValueComparer() |
||||
: base( |
: base( |
||||
(d1, d2) => d1.SequenceEqual(d2), |
(d1, d2) => d1.SequenceEqual(d2), |
||||
d => d.Aggregate(0, (k, v) => HashCode.Combine(k, v.GetHashCode())), |
d => d.Aggregate(0, (k, v) => HashCode.Combine(k, v.GetHashCode())), |
||||
d => d.ToDictionary(k => k.Key, v => v.Value)) |
d => new ExtraPropertyDictionary(d)) |
||||
{ |
{ |
||||
} |
} |
||||
} |
} |
||||
Loading…
Reference in new issue