public Category Update(EditCategoryCommand command)
        {
            var category = _repository.Get(command.Id);
            category.UpdateTitle(command.Title);
            _repository.Update(category);

            if (Commit())
                return category;

            return null;
        }
        public Task<HttpResponseMessage> Put(int id, [FromBody]dynamic body)
        {
            var command = new EditCategoryCommand(
                id: id,
                title: (string)body.title
            );

            var category = _service.Update(command);
            return CreateResponse(HttpStatusCode.OK, category);
        }