コード例 #1
0
ファイル: HomeController.cs プロジェクト: Nathan-Hurley/Taina
 public ActionResult Delete(int id, FormCollection form)
 {
     try
     {
         db.Delete(id);
         Log.Info(Helper.DELETED_PERSON_SUCCESS);
         return(RedirectToAction("Index"));
     }
     catch (InvalidOperationException e)
     {
         Log.Fatal(Helper.NOT_FOUND, e);
         return(View("NotFound"));
     }
     catch (Exception e)
     {
         Log.Fatal(Helper.FATAL_ERROR, e);
         return(View("Error"));
     }
 }
コード例 #2
0
 public ActionResult Delete(int id, FormCollection form)
 {
     db.Delete(id);
     return(RedirectToAction("Index"));
 }