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