Пример #1
0
        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));
            }
        }
Пример #2
0
 public void POST(Payments payments)
 {
     _paymentsService.Add(payments);
 }