Example #1
0
        private static Book GetBook(BooksRepository booksRepository)
        {
            var book = booksRepository.Get(2);

            Console.WriteLine($"{book.Title}: {book.PagesCount}");
            return(book);
        }
Example #2
0
        private static void GetAllBooks(BooksRepository booksRepository)
        {
            var books = booksRepository.Get();

            foreach (var bookItem in books)
            {
                Console.WriteLine($"{bookItem.Title}: {bookItem.PagesCount}");
            }
        }