public async Task <ActionResult <List <IBaseEntity> > > AddBasket([FromBody] ProductBasket models)
        {
            var model = await _basketService.AddBasketProduct(models);

            if (model != null)
            {
                return(Ok(model));
            }
            else
            {
                return(NotFound());
            }
        }
Esempio n. 2
0
        public async Task <IActionResult> AddBasketProduct(int productId)
        {
            await _basketService.AddBasketProduct(productId);

            return(RedirectToAction("Index", "Home"));
        }