Esempio n. 1
0
 public bool Equals(Employee other)
 {
     return(other != null &&
            base.Equals(other) &&
            Id.Equals(other.Id) &&
            Name == other.Name &&
            Email == other.Email &&
            Experience == other.Experience &&
            PositionId.Equals(other.PositionId) &&
            SalaryCategoryId.Equals(other.SalaryCategoryId) &&
            EqualityComparer <Guid?> .Default.Equals(ManagerId, other.ManagerId));
 }
Esempio n. 2
0
        public override int GetHashCode()
        {
            int hashCode = -782252986;

            hashCode = hashCode * -1521134295 + base.GetHashCode();
            hashCode = hashCode * -1521134295 + Id.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Name);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Email);

            hashCode = hashCode * -1521134295 + Experience.GetHashCode();
            hashCode = hashCode * -1521134295 + PositionId.GetHashCode();
            hashCode = hashCode * -1521134295 + SalaryCategoryId.GetHashCode();
            hashCode = hashCode * -1521134295 + ManagerId.GetHashCode();
            return(hashCode);
        }