Exemplo n.º 1
0
        public HttpResponseMessage Get()
        {
            try
            {
                var list = CountryModel.GetList();

                if (list == null)
                {
                    return(Request.CreateResponse(HttpStatusCode.NoContent));
                }

                return(Request.CreateResponse(HttpStatusCode.OK, list));
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
            }
        }