public static Borrowing Issue(Patron patron, BorrowableItem item) { Borrowing ret = null; if (item.BorrowedBy != null) throw new BookBorrowedException(); ret = new Borrowing(patron, item); item.BorrowedBy = ret; patron.BorrowedBooks.Add(ret); return ret; }
public void ReturnBook(Borrowing borrowing) { try { borrowing.ReturnBook(); _RecordOfBorrowings.Remove(borrowing.Item.Title); } catch (ReturnBookException e) { Console.WriteLine(e.Message); } }