コード例 #1
0
        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));
        }
コード例 #2
0
 public async Task <ShopDto> GetShop(int id)
 => await shopsService.GetShop(id);