public ActionResult PostPayment([FromBody] Payment payment) { if (ModelState.IsValid) { _menuItemRepository.AddPayment(payment); _menuItemRepository.Save(); return(Ok()); } else { return(BadRequest(ModelState)); } }