示例#1
0
        public async Task DodajDokoszykaPojedynczo(int id)
        {
            KoszykBusinessLogic koszyk  = new KoszykBusinessLogic(this._context, this.HttpContext);
            Produkt             produkt = await _context.Produkt.FindAsync(id);

            koszyk.DodajDoKoszyka(produkt);
        }
示例#2
0
        public async Task <ActionResult> DodajDoKoszyka(int id)
        {
            // Add it to the shopping cart
            KoszykBusinessLogic koszyk  = new KoszykBusinessLogic(this._context, this.HttpContext);
            Produkt             produkt = await _context.Produkt.FindAsync(id);


            koszyk.DodajDoKoszyka(produkt);
            return(RedirectToAction(nameof(Index)));


            // Go back to the main store page for more shopping
        }