Exemplo n.º 1
0
        public IActionResult PostPayment([FromBody] PaymentForCreationDTO paymentFromRequest)
        {
            if (paymentFromRequest == null)
            {
                return(BadRequest());
            }
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            _repo.AddPayment(ModelsMapping.GetPaymentEntity(paymentFromRequest));
            return(Ok());
        }