public ActionResult Index() { var c = bll.GetAll(); //ViewBag.Path= return(View(c.ToList())); }
public ActionResult Index() { sessionUserIdCookie = Request.Cookies["UserId"]; if (sessionUserIdCookie != null) { CategoryModel categoryModel = new CategoryModel(); categoryModel.LstCategories = _categoryLogic.GetAll(); return(View(categoryModel)); } else { return(RedirectToAction("AccessDenied", "Users")); } }