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

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