public IActionResult ShowDetails(int shopId) { ShopDetailsViewModel result = new ShopDetailsViewModel(); result.Shop = _mapper.Map <ShopModel>(_shopsService.GetShop(shopId, _mapper)); result.Products = _mapper.Map <List <ProductModel> >(_shopsService.GetProducts(shopId, _mapper)); ViewBag.Title = result.Shop.Name; return(View(result)); }
public async Task <ShopDto> GetShop(int id) => await shopsService.GetShop(id);