public ActionResult Edit(User user) { if (ModelState.IsValid) { context.Users.Update(user); return RedirectToAction("Index"); } return View(user); }
public ActionResult Create(User user) { if (ModelState.IsValid) { context.Users.Insert(user); return RedirectToAction("Index"); } return View(user); }