Пример #1
0
 public void RemoveAccommodation(Accommodation accommodationIn)
 {
     _accommodations.DeleteOne(accommodation => accommodation.Id == accommodationIn.Id);
 }
Пример #2
0
 public void UpdateAccommodation(string id, Accommodation accommodationIn)
 {
     _accommodations.ReplaceOne(accommodation => accommodation.Id == id, accommodationIn);
 }
Пример #3
0
 public Accommodation InsertAccommodation(Accommodation accommodation)
 {
     accommodation.Id = Guid.NewGuid().ToString();
     _accommodations.InsertOne(accommodation);
     return(accommodation);
 }