public ActionResult EditMenu(int id) { if (Session["UserName"] == null) { return RedirectToAction("Login", "Login"); } MenuRep mMenuRep = new MenuRep(); return View(mMenuRep.GetMenuList().Find(Menu => Menu.ID == id)); }
public ActionResult GetMenuList() { try { if (Session["UserName"] == null) { return RedirectToAction("Login", "Login"); } MenuRep mMenuRep = new MenuRep(); ModelState.Clear(); return View(mMenuRep.GetMenuList()); } catch (Exception ex) { throw ex; } }