public Book(string name, string author, DateTime publishingDate, int copies, Enums.Genre genre) { Name = name ?? throw new ArgumentNullException(nameof(name)); Author = author ?? throw new ArgumentNullException(nameof(author)); PublishingDate = publishingDate; Copies = copies; Genre = genre; }
public GenreCondition(Enums.Genre genre) { this.genre = genre; }
public IEnumerable <Book> FilterByAuthorAndGenre(Enums.Genre genre, string author) { return(_books.Where(x => x.Genre == genre && x.Author.ToLower() == author.ToLower())); }
public IEnumerable <Book> FilterByGenre(Enums.Genre genre) { return(_books.Where(x => x.Genre == genre)); }