コード例 #1
0
 public ActionResult Create([Bind(Exclude = "id")] t_hata t_HataToCreate)
 {
     try
     {
         _db.AddTot_hata(t_HataToCreate);
         _db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
コード例 #2
0
 public ActionResult DeleteConfirmed(int id)
 {
     try
     {
         t_hata hata = _db.t_hata.FirstOrDefault(x => x.hata_id == id);
         _db.t_hata.DeleteObject(hata);
         _db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }