Example #1
0
        // 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));
        }
Example #2
0
 // GET: Admin/Products/Create
 public IActionResult Create()
 {
     ViewData["ProductGroupId"] = new SelectList(_productGroupRepository.GetAllEntities(), "ProductGroupId", "ProductGroupTitle");
     return(View());
 }