Exemple #1
0
 public ILoan GetLoanByBook(IBook book)
 {
     if (book == null)
     {
         throw new ArgumentException(
             String.Format("LoanMapDAO : getLoanByBook : book cannot be null."));
     }
     foreach (ILoan loan in loanDict.Values)
     {
         IBook tempBook = loan.Book;
         if (book.Equals(tempBook))
         {
             return loan;
         }
     }
     return null;
 }