public ActionResult DeleteUser(int UserID) { ActionResult response; try { //executing procedure _UsersDAO.DeleteUserEntry(UserID); //setting response view response = RedirectToAction("AllUsers", "Users"); } //logging errors catch (SqlException sqlEx) { Logger.SqlErrorLog(sqlEx); response = View("Error"); } catch (Exception ex) { Logger.ErrorLog(ex); response = View("Error"); } //returning view return(response); }