public Book FindByTag(Filter filter) { foreach (var item in _bookStorage.GetAll()) { if (filter.IsEquals(item)) { return(item); } } throw new ArgumentException("Not found"); }
public Book FindByTag(Filter filter) { foreach (var item in _bookStorage.GetAll()) { if (filter.IsEquals(item)) { _logger.Info($"Book found"); return(item); } } _logger.Error($"ISBN {filter} not found"); throw new ArgumentException("Not found"); }
public BookListService(BookListStorage bookListStorage, ILogger logger) { _bookStorage = bookListStorage; _books = bookListStorage.GetAll(); _logger = logger; }
public BookListService(BookListStorage bookListStorage) { _bookStorage = bookListStorage; _books = bookListStorage.GetAll(); }