Exemplo n.º 1
0
        public IActionResult Get([FromQuery] double lat, [FromQuery] double lng, [FromQuery] double dist)
        {
            IActionResult result;

            try
            {
                ICollection <TourDto> retrieved = tours.GetToursWithinKmRange(lat, lng, dist);
                result = Ok(retrieved);
            }
            catch (ServiceException e)
            {
                result = errorFactory.GenerateError(e);
            }
            return(result);
        }
        public IActionResult Get(int id)
        {
            IActionResult result;

            try
            {
                LandmarkDto retrieved = landmarks.GetLandmarkById(id);
                result = Ok(retrieved);
            }
            catch (ServiceException e)
            {
                result = errorFactory.GenerateError(e);
            }
            return(result);
        }