public async Task <IActionResult> AddPayment([FromBody] PaymentHistoryViewModel paymentHistoryViewModel)
        {
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap <PaymentHistoryViewModel, PaymentHistoryDto>())
                         .CreateMapper();
            var paymentDto = mapper.Map <PaymentHistoryViewModel, PaymentHistoryDto>(paymentHistoryViewModel);

            await _paymentHistoryService.Add(paymentDto);

            return(Ok());
        }
Exemple #2
0
 public async Task <bool> Add([FromBody] PaymentHistory paymentHistory)
 {
     return(await paymentHistoryService.Add(paymentHistory));
 }