Пример #1
0
        public Borrower GetMostHighestBorrower()
        {
            var      allLoans    = _reportsRepository.GetAll();
            Loan     maxLoan     = allLoans.MaxBy(loan => loan.LoanBalance).FirstOrDefault();
            Borrower maxBorrower = new Borrower()
            {
                Name    = "",
                Balance = 0
            };

            if (maxLoan != null)
            {
                maxBorrower         = _borrowerRepository.GetById(maxLoan.BorrowerId);
                maxBorrower.Balance = maxLoan.LoanBalance;
            }


            return(maxBorrower);
        }
Пример #2
0
 public Borrower GetById(Guid id)
 {
     return(_borrowerRepository.GetById(id));
 }