public async Task <IViewComponentResult> InvokeAsync()
        {
            var shoppingCart = await _orderQueries.GetCustomerShoppingCart(CustomerId);

            var itemsQuantity = shoppingCart?.Items?.Count ?? 0;

            return(View(itemsQuantity));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Index()
        {
            var shoppingCart = await _orderQueries.GetCustomerShoppingCart(CustomerId);

            return(View(shoppingCart));
        }