コード例 #1
0
        public async Task <IActionResult> AddPhoneToShoppingCart(int id)
        {
            var successful = await _phoneService.AddPhoneToShoppingCartAsync(id);

            if (!successful)
            {
                return(BadRequest("Could not add phone to busket."));
            }

            return(RedirectToAction("Phones"));
        }