public void SetRating(string bookingRef, int rating) { var campId = _booking.Get(bookingRef).CampId; int[] ratings = _booking.SetAndGetRatings(bookingRef, rating); int roundedRating = (int)Math.Round(ratings.Average(), MidpointRounding.AwayFromZero); _camp.SetRating(roundedRating, campId); }
public BookingEntity GetBooking(string bookingRef) { var booking = _booking.Get(bookingRef); if (booking == null) { return(null); } var bookingDetails = _bmapper.BookingToBookingEntity(booking); return(bookingDetails); }