public ActionResult Create(Member member) { if (ModelState.IsValid) { db.Member.Add(member); db.SaveChanges(); return RedirectToAction("Index"); } return View(member); }
public ActionResult Edit(Member member) { if (ModelState.IsValid) { db.Entry(member).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(member); }