private static Book GetBook(BooksRepository booksRepository) { var book = booksRepository.Get(2); Console.WriteLine($"{book.Title}: {book.PagesCount}"); return(book); }
private static void GetAllBooks(BooksRepository booksRepository) { var books = booksRepository.Get(); foreach (var bookItem in books) { Console.WriteLine($"{bookItem.Title}: {bookItem.PagesCount}"); } }