Example #1
0
        public IActionResult GetOneReservation(int id)
        {
            try
            {
                ReservationModel reservationModel = reservationLogic.GetOneReservation(id);
                if (reservationModel == null)
                {
                    return(NotFound($"id {id} not found"));
                }

                return(Ok(reservationModel));
            }
            catch (Exception ex)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError, ErrorHelper.GetExceptionMessage(ex)));
            }
        }