Ejemplo n.º 1
0
        // GET api/<controller>/5
        public IHttpActionResult Get(int id)
        {
            if (id < 1)
            {
                return(BadRequest("Invalid reservation id"));
            }

            var result = _reservationAppService.GetReservation(id);

            if (result.Status == ActionResultCode.Success)
            {
                return(Ok(result));
            }

            return(BadRequest(result.Message));
        }
Ejemplo n.º 2
0
 public async Task <ReservationDTO> Get(string id)
 {
     return(await _reservationAppService.GetReservation(id));
 }