/// <summary> /// Returns true if OwnerVerificationPdfViewModel instances are equal /// </summary> /// <param name="other">Instance of OwnerVerificationPdfViewModel to be compared</param> /// <returns>Boolean</returns> public bool Equals(OwnerVerificationPdfViewModel other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( ReportDate == other.ReportDate || ReportDate.Equals(other.ReportDate) ) && ( Title == other.Title || Title.Equals(other.Title) ) && ( DistrictId == other.DistrictId || DistrictId.Equals(other.DistrictId) ) && ( MinistryDistrictId == other.MinistryDistrictId || MinistryDistrictId.Equals(other.MinistryDistrictId) ) && ( DistrictName == other.DistrictName || DistrictName.Equals(other.DistrictName) ) && ( DistrictAddress == other.DistrictAddress || DistrictAddress.Equals(other.DistrictAddress) ) && ( DistrictContact == other.DistrictContact || DistrictContact.Equals(other.DistrictContact) ) && ( Owners == other.Owners || Owners.Equals(other.Owners) )); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { // credit: http://stackoverflow.com/a/263416/677735 unchecked // Overflow is fine, just wrap { int hash = 41; // Suitable nullity checks hash = hash * 59 + ReportDate.GetHashCode(); hash = hash * 59 + Title.GetHashCode(); hash = hash * 59 + DistrictId.GetHashCode(); hash = hash * 59 + MinistryDistrictId.GetHashCode(); hash = hash * 59 + DistrictName.GetHashCode(); hash = hash * 59 + DistrictAddress.GetHashCode(); hash = hash * 59 + DistrictContact.GetHashCode(); hash = hash * 59 + Owners.GetHashCode(); return(hash); } }