// GET: Admin/ProductGroups public async Task <IActionResult> Index() { var productGroups = _productGroupRepository.GetAllEntities().ToList(); var productGroupsModel = _mapper.Map <List <ProductGroup>, List <ProductGroupViewModel> >(productGroups); return(View(productGroupsModel)); }
// GET: Admin/Products/Create public IActionResult Create() { ViewData["ProductGroupId"] = new SelectList(_productGroupRepository.GetAllEntities(), "ProductGroupId", "ProductGroupTitle"); return(View()); }