Exemple #1
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (Id != null)
         {
             hashCode = hashCode * 59 + Id.GetHashCode();
         }
         if (Employeid != null)
         {
             hashCode = hashCode * 59 + Employeid.GetHashCode();
         }
         if (Data != null)
         {
             hashCode = hashCode * 59 + Data.GetHashCode();
         }
         if (Miid != null)
         {
             hashCode = hashCode * 59 + Miid.GetHashCode();
         }
         return(hashCode);
     }
 }
Exemple #2
0
        /// <summary>
        /// Returns true if Record instances are equal
        /// </summary>
        /// <param name="other">Instance of Record to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Record other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     Employeid == other.Employeid ||
                     Employeid != null &&
                     Employeid.Equals(other.Employeid)
                 ) &&
                 (
                     Data == other.Data ||
                     Data != null &&
                     Data.Equals(other.Data)
                 ) &&
                 (
                     Miid == other.Miid ||
                     Miid != null &&
                     Miid.Equals(other.Miid)
                 ));
        }