public void DisplayTitle() { BookListView listView = new BookListView(bookDb); int count = 0; string response = Console.ReadLine(); Console.WriteLine("Here are all our books that share that title:"); foreach (Book b in bookDb) { if (b.Title.ToLower().Contains(response.ToLower())) { listView.DisplayTitle(b.Title); } else { count++; } } if (count == bookDb.Count) { Console.Clear(); Console.WriteLine($"Oops! Sorry, it looks like we could not find \"{response}\" in our records of books"); } else { CheckOut(); } }
public void DisplayAllTitle() { BookListView listView = new BookListView(bookDb); foreach (Book b in bookDb) { listView.DisplayTitle(b.Title); } }