public IActionResult Index(int id) { ProductDetailViewModel productDetail = new ProductDetailViewModel() { }; productDetail.ProductDetail = _productService.GetById(id); productDetail.ProductRelate = _productService.GetProductRelate(productDetail.ProductDetail.CategoryId, 6); productDetail.ProductUpsell = _productService.GetProductUpsell(6); productDetail.ProductTags = _productService.GetTagByProductId(id); productDetail.DomainApi = _config["DomainApi:Domain"]; productDetail.ProductImages = _productImageService.GetProductImageByProdutId(id); productDetail.Colors = _productQuantityService.GetColorByProductId(id); productDetail.WholePrices = _wholePriceService.GetAllByProductId(id); return(View(productDetail)); }
public IActionResult Get(int productId) { return(new OkObjectResult(_wholePriceService.GetAllByProductId(productId))); }