Ejemplo n.º 1
0
        public void ShowAllBooks()
        {
            var books     = _bookRepository.GetBookRepo();
            var booksInfo = BookRepositoryService.BookInfo(books);

            Console.WriteLine(booksInfo);
        }
Ejemplo n.º 2
0
        public void ShowListOfBooks(SearchBy searchBy)
        {
            BookFound booksFound = null;

            switch (searchBy)
            {
            case SearchBy.ByName:
                booksFound = new BookFoundByName();
                break;

            case SearchBy.ByTime:
                booksFound = new BookFoundByTime();
                break;

            default:
                break;
            }
            IEnumerable <Book> books    = booksFound.Books(_bookRepository.GetBookRepo());
            string             bookinfo = BookRepositoryService.BookInfo(books);

            Console.WriteLine(bookinfo);
        }