public HttpResponseMessage PutCategory(Category category)
        {
            if (category == null)
                return Request.CreateResponse(HttpStatusCode.BadRequest);

            try
            {
                db.Entry<Category>(category).State = System.Data.Entity.EntityState.Modified;
                db.SaveChanges();

                var result = category;
                return Request.CreateResponse(HttpStatusCode.OK, result);
            }
            catch
            {
                return Request.CreateResponse(HttpStatusCode.InternalServerError, "Falha ao alterar categoria");
            }
        }
        public HttpResponseMessage PostCategory(Category category)
        {
            if (category == null)
                return Request.CreateResponse(HttpStatusCode.BadRequest);

            try
            {
                db.Categories.Add(category);
                db.SaveChanges();

                var result = category;
                return Request.CreateResponse(HttpStatusCode.OK, result);
            }
            catch
            {
                return Request.CreateResponse(HttpStatusCode.InternalServerError, "Falha ao incluir categoria");
            }
        }