Exemplo n.º 1
0
 public ActionResult Index(Form form)
 {
     try
     {
         repo.Add(form);
         return RedirectToAction("Save", form);
     }
     catch
     {
         return View(form);
     }
 }
Exemplo n.º 2
0
 public ActionResult Save(Form form)
 {
     return View(form);
 }
 public void Edit(Form item)
 {
     _db.Entry(item).State = EntityState.Modified;
     _db.SaveChanges();
 }
 public void Add(Form item)
 {
     _db.Forms.Add(item);
     _db.SaveChanges();
 }