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