Пример #1
0
        public async Task <IActionResult> AddToCart(int drinkId, int quantity)
        {
            string userId = _context.CheckАuthentication(User.Identity);
            var    drink  = _drinkRepository.Get(drinkId);

            _context.AddDrink(drink, quantity, userId);
            return(Redirect("/Purchase/BuyDrink"));
        }