Exemplo n.º 1
0
        public override int GetHashCode()
        {
            var result = 0;

            result = (result * 397) ^ (Name ?? String.Empty).GetHashCode();
            result = (result * 397) ^ (Email ?? String.Empty).GetHashCode();
            result = (result * 397) ^ IsAdmin.GetHashCode();
            result = (result * 397) ^ (DisplayName ?? String.Empty).GetHashCode();
            return(result);
        }
Exemplo n.º 2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id;
         hashCode = (hashCode * 397) ^ (Username != null ? Username.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Firstname != null ? Firstname.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Lastname != null ? Lastname.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Password != null ? Password.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IsAdmin.GetHashCode();
         return(hashCode);
     }
 }