예제 #1
0
        /// <summary>
        /// Returns true if ServiceArea instances are equal
        /// </summary>
        /// <param name="other">Instance of ServiceArea to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ServiceArea other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id.Equals(other.Id)
                     ) &&
                 (
                     MinistryServiceAreaID == other.MinistryServiceAreaID ||
                     MinistryServiceAreaID.Equals(other.MinistryServiceAreaID)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     District == other.District ||
                     District != null &&
                     District.Equals(other.District)
                 ) &&
                 (
                     StartDate == other.StartDate ||
                     StartDate.Equals(other.StartDate)
                 ) &&
                 (
                     AreaNumber == other.AreaNumber ||
                     AreaNumber != null &&
                     AreaNumber.Equals(other.AreaNumber)
                 ) &&
                 (
                     EndDate == other.EndDate ||
                     EndDate != null &&
                     EndDate.Equals(other.EndDate)
                 ));
        }
예제 #2
0
 /// <summary>
 /// Determines if two SocialSecurityNumber objects are equal.
 /// </summary>
 /// <param name="other">The other number.</param>
 /// <returns><c>true</c> if equal, <c>false</c> otherwise.</returns>
 public bool Equals(SocialSecurityNumber other)
 {
     return(AreaNumber.Equals(other.AreaNumber) && GroupNumber.Equals(other.GroupNumber) && SerialNumber.Equals(other.SerialNumber));
 }