public IHttpActionResult DeleteCategory(int id)
        {
            var category = context.Categories.Find(id);

            if (category == null)
            {
                return NotFound();
            }

            context.Categories.Remove(category);
            context.SaveChanges();

            var categoryViewModel = new CategoryViewModel(category);

            return Ok(categoryViewModel);
        }
        public IHttpActionResult PostCategory([FromBody]AddCategoryBindingModel categoryBindingModel)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            var category = new Category(categoryBindingModel.Name);

            context.Categories.Add(category);
            context.SaveChanges();

            var categoryViewModel = new CategoryViewModel(category);

            return CreatedAtRoute("DefaultApi", new { id = categoryViewModel.Id }, categoryViewModel);
        }