Example #1
0
        // GET api/categories/5
        public Category Get(string id)
        {
            Category cat = Comercial.GetCategory(id);

            if (cat == null)
            {
                throw new HttpResponseException(
                          Request.CreateResponse(HttpStatusCode.NotFound, "O cliente não existe."));
            }
            else
            {
                return(cat);
            }
        }