[HttpPost("addtocart")]
public IActionResult AddToCart( Cart cart,
Product product,
ProductOption productOption
)
{
_cartService.Add(cart);
_productService.Add(product);
_productOptionService.Add(productOption);
return NoContent();
}
Why I cannot use IActionResult with multiple parameters and how to solve this issue
AddToCartseemingly serve to create a cart, product, and product option? I would expect a cart to exist, a product to exist, and for you to be adding an entry for that product in the cart, along with any chosen options.