public void ShowAllBooks() { var books = _bookRepository.GetBookRepo(); var booksInfo = BookRepositoryService.BookInfo(books); Console.WriteLine(booksInfo); }
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); }