public GetProductResponse GetProduct(GetProductRequest request)
 {
     GetProductResponse response = new GetProductResponse();
     ProductTitle productTitle = _productTitleRepository.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.BasketSummary = base.GetBasketSummaryView();
            productDetailView.Categories = base.GetCategories();

            return View(productDetailView);
        }