Ejemplo n.º 1
0
        public async Task <IActionResult> Post(CreatePaymentHistory paymentHistory)
        {
            var newPaymentHistory = new PaymentHistoryModel
            {
                Amount     = paymentHistory.Amount,
                CategoryId = paymentHistory.CategoryId,
                CreatedBy  = paymentHistory.CreatedBy,
                Date       = paymentHistory.Date,
                Notes      = paymentHistory.Notes
            };
            await _paymentHistoryService.CreateAsync(newPaymentHistory);

            return(Ok());
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Create([FromBody] CreatePaymentHistoryDto command)
        {
            var response = await _paymentHistoryService.CreateAsync(command);

            return(CreatedAt(response));
        }