public ActionResult DeleteConfirmed(int id) { Member user = db.Member.Find(id); if (user != null) { try { authentication.DeleteUserAccount(user); List <Member> users = db.Member.ToList(); return(RedirectToAction("Index", "User", users)); } catch (Exception ex) { ViewBag.ErrorMessage = ex.Message; } } return(View(user)); }