Пример #1
0
        public ActionResult GetAllSubCategories()
        {
            IEnumerable <subcategory> subcategList    = subcateg.GetMany();
            List <subcategory>        subcategFinalll = subcategList.ToList();

            return(View(subcategFinalll));
        }
        public ActionResult renderAddGoods()
        {
            int connectedSwapper = 1; // identity connected user

            swapper user = swapperService.Get(u => u.id_swapper == connectedSwapper);

            ViewBag.user = user;

            IEnumerable <category> categories = categoryService.GetAll();

            category cat = categories.First();
            IEnumerable <subCategory> subCategories = subCategoryService.GetMany(s => s.categoryID == cat.id_category);

            ViewBag.categories    = categories;
            ViewBag.subCategories = subCategories;

            return(View());
        }