Пример #1
0
 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;
 }
Пример #2
0
 public GenreCondition(Enums.Genre genre)
 {
     this.genre = genre;
 }
Пример #3
0
 public IEnumerable <Book> FilterByAuthorAndGenre(Enums.Genre genre, string author)
 {
     return(_books.Where(x => x.Genre == genre && x.Author.ToLower() == author.ToLower()));
 }
Пример #4
0
 public IEnumerable <Book> FilterByGenre(Enums.Genre genre)
 {
     return(_books.Where(x => x.Genre == genre));
 }