/// <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 (Model != null) { hashCode = hashCode * 59 + Model.GetHashCode(); } if (Year != null) { hashCode = hashCode * 59 + Year.GetHashCode(); } if (Price != null) { hashCode = hashCode * 59 + Price.GetHashCode(); } if (SerialNumber != null) { hashCode = hashCode * 59 + SerialNumber.GetHashCode(); } if (SoldDateUtc != null) { hashCode = hashCode * 59 + SoldDateUtc.GetHashCode(); } if (Comment != null) { hashCode = hashCode * 59 + Comment.GetHashCode(); } if (Transmission != null) { hashCode = hashCode * 59 + Transmission.GetHashCode(); } if (Motor != null) { hashCode = hashCode * 59 + Motor.GetHashCode(); } if (GarageId != null) { hashCode = hashCode * 59 + GarageId.GetHashCode(); } if (SellerId != null) { hashCode = hashCode * 59 + SellerId.GetHashCode(); } return(hashCode); } }