public List <BorrowerDTO> GetAllBorrowers() { var borrowersList = new List <BorrowerDTO>(); try { borrowersList = _borrowerService.GetAll(); } catch (Exception ex) { using (_logger.BeginScope(new Dictionary <string, object> { { "Borrower", "GetAllBorrowers" } })) { _logger.LogError(ex.Message); } throw ex; } return(borrowersList); }
public IEnumerable <Borrower> Get() { return(_borrowerService.GetAll()); }
public async Task <ActionResult <IEnumerable <Borrower> > > GetAllBorrowers() { var borrowers = await _borrowerService.GetAll(); return(Ok(borrowers)); }