public ActionResult Create(Category category)
        {
            if (ModelState.IsValid)
            {
                _controller.Post(category);
                return RedirectToAction("Index");
            }

            return View(category);
        }
Beispiel #2
0
 public void UpdateCategory(Category category)
 {
     _repository.Update(category);
     _repository.SaveChanges();
 }
Beispiel #3
0
 public void AddCategory(Category category)
 {
     _repository.Add(category);
     _repository.SaveChanges();
 }