using Muchinfo.MTPClient.Data.Model; using System.Collections.Generic; namespace Muchinfo.MTPClient.Infrastructure.Comparers { public class UserInfoComparer : IEqualityComparer { public bool Equals(UserInfo x, UserInfo y) { if (null == x || null == y) { return false; } return x.UserName == y.UserName; } public int GetHashCode(UserInfo obj) { return obj.UserName.GetHashCode(); } } }