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