public ActionResult Create(Category category) { if (ModelState.IsValid) { _controller.Post(category); return RedirectToAction("Index"); } return View(category); }
public void UpdateCategory(Category category) { _repository.Update(category); _repository.SaveChanges(); }
public void AddCategory(Category category) { _repository.Add(category); _repository.SaveChanges(); }