public ActionResult AdminDeleteConfirmed(int id) { using (Repos repo = new Repos()) { if (!repo.DeleteModule(id)) { //ERROR DELETING MODULE } } return(RedirectToAction("Index", new { controller = "Profile" })); }