コード例 #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);
 }