public ActionResult Delete(int id, IFormCollection collection)
 {
     try
     {
         traineeRepository.Delete(id);
         return(RedirectToAction(nameof(Index)));
     }
     catch
     {
         return(View());
     }
 }
Exemple #2
0
 public IActionResult Delete(int id)
 {
     db.Delete(id);
     return(RedirectToAction("Index"));
 }