/// <summary> /// Returns true if Reservation instances are equal /// </summary> /// <param name="other">Instance of Reservation to be compared</param> /// <returns>Boolean</returns> public bool Equals(Reservation other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( IdReservation == other.IdReservation || IdReservation.Equals(other.IdReservation) ) && ( Car == other.Car || Car != null && Car.Equals(other.Car) ) && ( Days == other.Days || Days.Equals(other.Days) ) && ( Price == other.Price || Price.Equals(other.Price) ) && ( ReservationNr == other.ReservationNr || ReservationNr != null && ReservationNr.Equals(other.ReservationNr) ) && ( PickUpDate == other.PickUpDate || PickUpDate != null && PickUpDate.Equals(other.PickUpDate) ) && ( IsLease == other.IsLease || IsLease.Equals(other.IsLease) ) && ( Customer == other.Customer || Customer != null && Customer.Equals(other.Customer) )); }