Пример #1
0
 public void Update(string id, Models.Book bookIn) =>
 _books.ReplaceOne(book => book.Id == id, bookIn);
Пример #2
0
 public void Delete(Models.Book bookIn) =>
 _books.DeleteOne(book => book.Id == bookIn.Id);
Пример #3
0
 public Models.Book Insert(Models.Book book)
 {
     _books.InsertOne(book);
     return(book);
 }