// Get all
        public IActionResult Index()
        {
            var categories             = categoryRepo.GetCategories();
            var subcategories          = subcategoryRepo.GetSubcategories();
            var products               = productRepo.GetProducts();
            var productAttributes      = productAttributeRepo.GetProductAttributes();
            var attributeGroups        = attributeGroupRepo.GetAttributeGroups();
            var customeAttributegroups = customAttributeGroupRepo.GetPreDifinedOptions();
            var vm = new MainPageViewModel
            {
                Categories        = categories,
                Subcategories     = subcategories,
                Products          = products,
                ProductAttributes = productAttributes,
                AttributeGroups   = attributeGroups
            };

            return(View(vm));
        }
Beispiel #2
0
        // Get all
        public IActionResult Index()
        {
            var categories     = categoryRepo.GetCategories();
            var subcategories  = subcategoryRepo.GetSubcategories();
            var products       = productRepo.GetProducts();
            var prodAttributes = prodAttrRepo.GetProductAttributes();
            var AttrGroup      = attrGroupRepo.GetAttributeGroups();
            var subAttrGroups  = subAttrGroupRepo.GetSubcategoryAttributeGroups();
            var prodAttrValue  = prodAttrValueRepo.GetProductAttributeValues();


            var vm = new MainPageViewModel
            {
                Categories                 = categories,
                Subcategories              = subcategories,
                Products                   = products,
                ProductAttributes          = prodAttributes,
                AttributeGroups            = AttrGroup,
                SubcategoryAttributeGroups = subAttrGroups,
                ProductAttributeValues     = prodAttrValue
            };

            return(View(vm));
        }