public ActionResult Delete(int id, UserBLL delete) { try { using (BusinessLogicLayer.ContextBLL ctx = new BusinessLogicLayer.ContextBLL()) ctx.UserDelete(id); // TODO: Add delete logic here return(RedirectToAction("Index")); } catch (Exception ex) { Logger.Logger.Log(ex); return(View("Error")); } }