Пример #1
0
 public Book GetByISBN(string isbn)
 {
     return(Books.Find(x => x.ISBN == isbn));
 }
Пример #2
0
 public void Delete(Book book)
 {
     Books.Remove(book);
 }
Пример #3
0
 public Book Find(Book book)
 {
     return(Books.Find(x => x.Title == book.Title));
 }
Пример #4
0
 public IEnumerable <Book> GetAll()
 {
     return(Books.ToArray());
 }
Пример #5
0
 public void Add(Book book)
 {
     book.Id = Guid.NewGuid();
     Books.Add(book);
 }
Пример #6
0
 public Book GetById(Guid id)
 {
     return(Books.Find(x => x.Id == id));
 }