public ActionResult Delete(int? id, CategoryViewModel categoryViewModel)
 {
     return ManipulaateCategory(id, true,
         c =>
         {
             this.Data.Categories.Delete(c);
         });
 }
        public ActionResult Edit(int? id, CategoryViewModel categoryViewModel)
        {
            return ManipulaateCategory(id, true,
                c =>
                {
                    c.Name = categoryViewModel.Name;

                    this.Data.Categories.Update(c);
                });
        }
        public ActionResult Create(CategoryViewModel categoryViewModel)
        {
            return ManipulaateCategory(0, false,
                c =>
                {
                    var category = new Category
                    {
                        Name = categoryViewModel.Name
                    };

                    this.Data.Categories.Add(category);
                });
        }
        public ActionResult Create()
        {
            var category = new CategoryViewModel();

            return View(category);
        }