Exemplo n.º 1
0
        public IHttpActionResult Get()
        {
            HttpResponseMessage response = null;

            try
            {
                var countries = _countryHandler.Retrieve();
                return(Ok(new ReturnData(DataList.CodeStatus.Ok, "Countries extracted", countries)));
            }
            catch (CException e)
            {
                response = Request.CreateResponse((HttpStatusCode)510, new ReturnData(e.Status, e.Message));
            }
            return(new ResponseMessageResult(response));
        }