Пример #1
0
 //Method for deleting a game from the database
 public ActionResult DeleteGame(int gameId)
 {
     //Beginning of processes
     try
     {
         //using DAL access to call on the game delete method, and passing in the game id
         _dataAccess.GameDelete(gameId);
     }
     //catch to record any exceptions that crop up
     catch (Exception ex)
     {
         //call to method to record necessary information
         ErrorFile.ErrorHandlerPL(ex);
     }
     //finally to tie up any loose ends
     finally
     { }
     //redirects to the specified page
     return(RedirectToAction("Index", "Game"));
 }