// GET: Admin/MainCategory
        public virtual ActionResult Index()
        {
            ViewBag.list = _mainCategory.GetAll();

            var list = _mainCategory.GetAll().Where(c => c.ParentId == null);

            return(View(list));
        }
Ejemplo n.º 2
0
        public virtual ActionResult Create()
        {
            ViewBag.MainCategoryId = new SelectList(_mainCategory.GetAll().Where(c => c.MarkAsDelete != true), "MainCategoryId", "Name");

            ViewBag.UserId = new SelectList(_usersManager.GetAllUsers(), "Id", "UserName");
            return(View());
        }