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()); } }
public async Task <IActionResult> AddBasketProduct(int productId) { await _basketService.AddBasketProduct(productId); return(RedirectToAction("Index", "Home")); }