public Loan CheckoutBook(long patronId, long bookId)
        {
            var patron = _patronStorage.GetById(patronId);

            patron.CheckOutBook();

            var book = _bookStorage.GetById(bookId);

            book.CheckOut();

            var loan = new Loan(patron, book);

            _loanStorage.Create(loan);
            return(loan);
        }
        public Loan CheckoutBook(Guid patronId, Guid bookId, Guid userId)
        {
            var patron = _patronStorage.GetById(patronId, userId);

            patron.CheckOutBook();
            _patronStorage.Update(patron);

            var book = _bookStorage.GetById(bookId, userId);

            book.CheckOut();
            _bookStorage.Update(book);

            var loan = new Loan(patron, book, userId);

            _loanStorage.Create(loan);
            return(loan);
        }