コード例 #1
0
 public void UpdateKeywordReservation(KeywordReservation keywordReservation)
 {
     using (var connection = _databaseService.Connect())
     {
         var rsv = connection.Reservations.SingleOrDefault(w => w.ReservationId == keywordReservation.Reservation.ReservationId);
         if (rsv == null)
         {
             throw new InvalidOperationException();
         }
         rsv.KeywordReservation.Merge(keywordReservation);
         connection.DetectChanges();
         connection.SaveChanges();
     }
 }
コード例 #2
0
 public void DeleteKeywordReservation(KeywordReservation keywordReservation)
 {
     keywordReservation.Reservation.IsEnabled = false;
     UpdateKeywordReservation(keywordReservation);
 }