private IEnumerable <Book> GetUserBooks(int userId) { var booksIds = _rentalRepository.GetUserBooksIds(userId); return(booksIds.Select(bookId => _inventoryRepository.GetBookById(bookId)).ToList()); }
public Book GetBookById(int bookId) { return(_inventoryRepository.GetBookById(bookId)); }
public Book RentBook(Borrow borrow) { _rentalRepository.RentBook(borrow); return(_inventoryRepository.GetBookById(borrow.BookId)); }