// 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)); }
// 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)); }