예제 #1
0
 public ActionResult DeleteConfirmed(int id)
 {
     try
     {
         _eRepository.Remove(id);
         return(RedirectToAction("Index"));
     }
     catch (Exception ex)
     {
         Experiment thisExperiment = _eRepository.Load(id);
         ModelState.AddModelError("", ex.Message);
         return(View(thisExperiment));
     }
 }