public async Task <IViewComponentResult> InvokeAsync() { var shoppingCart = await _orderQueries.GetCustomerShoppingCart(CustomerId); var itemsQuantity = shoppingCart?.Items?.Count ?? 0; return(View(itemsQuantity)); }
public async Task <IActionResult> Index() { var shoppingCart = await _orderQueries.GetCustomerShoppingCart(CustomerId); return(View(shoppingCart)); }