public IViewComponentResult Invoke() { _shoppingCard.ShoppingCardItems = _shoppingCard.GetShoppingCardItems(); var shoppingcardVM = new ShoppingCardViewModel { ShoppingCard = _shoppingCard, ShoppingCardTotal = _shoppingCard.GetTotal() }; return(View(shoppingcardVM)); }
public ViewResult Index() { _shoppingCard.ShoppingCardItems = _shoppingCard.GetShoppingCardItems(); var shoppingcardVM = new ShoppingCardViewModel { ShoppingCard = _shoppingCard, ShoppingCardTotal = _shoppingCard.GetTotal() }; return(View(shoppingcardVM)); }