public ActionResult Create(Deed deed) { if (ModelState.IsValid) { context.Deeds.Add(deed); context.SaveChanges(); return RedirectToAction("Index"); } ViewBag.PossiblePeople = context.People; return View(deed); }
public ActionResult Edit(Deed deed) { if (ModelState.IsValid) { context.Entry(deed).State = EntityState.Modified; context.SaveChanges(); return RedirectToAction("Index"); } ViewBag.PossiblePeople = context.People; return View(deed); }