コード例 #1
0
 public GetProductResponse GetProduct(GetProductRequest request)
 {
     GetProductResponse response = new GetProductResponse();
     ProductTitle productTitle = _productTitleRespository.FindBy(request.ProductId);
     response.Product = productTitle.ConvertToProductDetailView();
     return response;
 }
コード例 #2
0
        public ActionResult Detail(int id)
        {
            ProductDetailView productDetailView = new ProductDetailView();
            GetProductRequest request = new GetProductRequest() { ProductId = id };
            GetProductResponse response = _productService.GetProduct(request);

            ProductView productView = response.Product;
            productDetailView.Product = productView;
            productDetailView.Categories = base.GetCategories();
            productDetailView.BasketSummary = base.GetBasketSummaryView();
            return View(productDetailView);
        }