public ActionResult Create(User user) { if(ModelState.IsValid) { userRepository.Create(user); } return View(); }
public ActionResult Create(User user) { if (ModelState.IsValid) { userRepository.Create(user); return RedirectToAction("Index"); } return View(); }
public ActionResult Delete(User user) { userRepository.Delete(user.ID); return RedirectToAction("Index"); }