コード例 #1
0
        public IActionResult Index(string category_slug = "all-categories", string brand_slug = "all-brands")
        {
            ViewData["SelectedCategory"] = category_slug;
            ViewData["SelectedBrand"]    = brand_slug;

            var pagedProducts = _catalogueService.FetchProducts(category_slug, brand_slug);

            return(View(pagedProducts));
        }
コード例 #2
0
        public IActionResult Index(string category_slug = "all-categories", string brand_slug = "all-brands")
        {
            ViewData["SelectedCategory"] = category_slug;
            ViewData["SelectedBrand"]    = brand_slug;

            ViewData["CartTotal"]      = _cartService.GetCartTotal();
            ViewData["CartItemsCount"] = _cartService.CartItemsCount();
            ViewData["CartItems"]      = _cartService.GetCartItems();


            var pagedProducts = _catalogueService.FetchProducts(category_slug, brand_slug);

            ViewData["Page"] = pagedProducts.PagedProducts.CurrentPage;

            return(View(pagedProducts));
        }
コード例 #3
0
ファイル: ProductService.cs プロジェクト: mackmak/BMES
        public FetchProductsResponse GetProducts(FetchProductsRequest fetchProductsRequest)
        {
            var fetchProductsResponse = _catalogueService.FetchProducts(fetchProductsRequest);

            return(fetchProductsResponse);
        }
コード例 #4
0
        public FetchProductResponse FetchProduct(FetchProductRequest fetchproductRequest)
        {
            var product = catalogueService.FetchProducts(fetchproductRequest);

            return(product);
        }