Ejemplo n.º 1
0
        public ActionResult Create(Deed deed)
        {
            if (ModelState.IsValid)
            {
                context.Deeds.Add(deed);
                context.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.PossiblePeople = context.People;
            return View(deed);
        }
Ejemplo n.º 2
0
 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);
 }