public ActionResult <ResponseModel> Post([FromBody] PaymentsModel entity) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } try { return(Created("", _paymentsService.Add(entity))); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public void POST(Payments payments) { _paymentsService.Add(payments); }