Ejemplo n.º 1
0
        public async Task <List <GetDebtByIdResponse> > FilterDebtsById(FilterDebtRequest filterDebtRequest)
        {
            var debt = await _debtsServices.FilterDebtsAsync(filterDebtRequest.Name,
                                                             filterDebtRequest.Value,
                                                             filterDebtRequest.Date,
                                                             (DebtInstallmentType?)filterDebtRequest.DebtInstallmentType,
                                                             (DebtType?)filterDebtRequest.DebtType);

            var debtAppResult = debt.Select(x => x.ToResponseModel()).ToList();

            return(debtAppResult);
        }
Ejemplo n.º 2
0
        public async Task <ActionResult <GetDebtByIdResponse> > FilterAsync([FromQuery] FilterDebtRequest filterDebtRequest)
        {
            var debt = await _debtsApplicationService.FilterDebtsById(filterDebtRequest);

            return(new OkObjectResult(debt));
        }