Exemplo n.º 1
0
        public async Task <ApproveLoanResult> Handle(ApproveLoanCommand request, CancellationToken cancellationToken)
        {
            var loan = await loanRepository.FindById(request.Id);

            loan.Approve();
            await loanRepository.Update(loan);

            return(new ApproveLoanResult {
                Id = loan.Id
            });
        }
Exemplo n.º 2
0
 public async Task <Loan> FindById(long id)
 {
     return(await loanRepository.FindById(id));
 }