public async Task <ActionResult <CartViewModel> > Post( [FromBody] List <SaleFormatFrontEndViewModel> model) { if (ModelState.IsValid) { foreach (var mod in model) { Product product = await this._productService.FindByIdAsync(mod.ProductId); cart.CartAddProduct(new SaleViewModel(mod.Amount, product)); } return(cart); } else { return(BadRequest(ModelState)); } }