public GetProductResponse GetProduct(GetProductRequest request) { GetProductResponse response = new GetProductResponse(); ProductTitle productTitle = _productTitleRespository.FindBy(request.ProductId); response.Product = productTitle.ConvertToProductDetailView(); return response; }
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); }