public ActionResult Delete(int id) { repo.Remove(repo.Get(id)); repo.SaveChanges(); int redirectPage = (int)Session["LastPage"]; return(RedirectToAction("Index", new { id = redirectPage })); }