Ejemplo n.º 1
0
        public IActionResult GetRoomPrices([FromRoute] int roomId)
        {
            if (!roomsService.RoomExists(roomId))
            {
                return(NotFound("The specified room ID does not exist"));
            }

            try
            {
                var roomPrice = roomsService.GetRoomPricing(roomId);

                return(Ok(roomPrice));
            }
            catch (Exception e)
            {
                return(BadRequest(e));
            }
        }