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

            ViewBag.PossibleDeeds = context.Deeds;
            return View(act);
        }
Ejemplo n.º 2
0
 public ActionResult Edit(Act act)
 {
     if (ModelState.IsValid)
     {
         context.Entry(act).State = EntityState.Modified;
         context.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.PossibleDeeds = context.Deeds;
     return View(act);
 }