public ViewResult Index() { var items = _shoppingCart.GetShoppingCartItems(); _shoppingCart.CartItems = items; var shoppingCartViewModel = new ShoppingCartVModel { ShoppingCart = _shoppingCart, ShoppingCartTotal = _shoppingCart.GetShoppingCartTotal() }; return(View(shoppingCartViewModel)); }
/// <summary> /// metoda do przekazania oraz wyświetlaniadanych /// </summary> /// <returns>zwraca dane które odpowiadają logicę w danej metodzie</returns> public IViewComponentResult Invoke() { var items = _shoppingCart.GetShoppingCartItems(); _shoppingCart.CartItems = items; var shoppingCartViewModel = new ShoppingCartVModel { ShoppingCart = _shoppingCart, ShoppingCartTotal = _shoppingCart.GetShoppingCartTotal(), //Genre = _genre.Genres.ToList() }; return(View("Default", shoppingCartViewModel)); }
public IActionResult BasicData1(ShoppingCartVModel shoppingCart) { return(View(shoppingCart)); }