Exemplo n.º 1
0
 public ActionResult Delete(int id, Bug bug)
 {
     try
     {
         _db.Entry(bug).State = System.Data.EntityState.Deleted;
         _db.SaveChanges();
         return RedirectToAction("Index");
     }
     catch
     {
         // TODO Add error display logic here eventually.
         return View();
     }
 }
Exemplo n.º 2
0
 public ActionResult Create(Bug newBug)
 {
     try
     {
         _db.Bugs.Add(newBug);
         _db.SaveChanges();
         return RedirectToAction("Index");
     }
     catch
     {
         // TODO Add error display logic here eventually.
         return View();
     }
 }