public ReservationDto InsertReservation(ReservationDto reservationDto)
        {
            WriteActualMethod();

            Reservation reservation = reservationDto.ConvertToEntity();

            return autoReservationBusinessComponent.Insert(reservation).ConvertToDto();
        }
        public ReservationDto UpdateReservation(ReservationDto modified, ReservationDto original)
        {
            WriteActualMethod();

            Reservation modReservation = modified.ConvertToEntity();
            Reservation origReservation = original.ConvertToEntity();

            return autoReservationBusinessComponent.Update(modReservation, origReservation).ConvertToDto();
        }
 public void DeleteReservation(ReservationDto reservation)
 {
     WriteActualMethod();
     _businessComponent.DeleteReservation(reservation.ConvertToEntity());
 }
 public void UpdateReservation(ReservationDto modified, ReservationDto original)
 {
     WriteActualMethod();
     try
     {
         _businessComponent.UpdateReservation(modified.ConvertToEntity(), original.ConvertToEntity());
     }
     catch (LocalOptimisticConcurrencyException<Reservation> e)
     {
         throw new FaultException<ReservationDto>(e.MergedEntity.ConvertToDto());
     }
 }
 public void DeleteReservation(ReservationDto selectedReservation)
 {
     WriteActualMethod();
     BusinessComponent.DeleteReservation(selectedReservation.ConvertToEntity());
 }
        public void UpdateReservation(ReservationDto reservation, ReservationDto original)
        {
            WriteActualMethod();
            Reservation reservationEntity = reservation.ConvertToEntity();
            Reservation originalEntity = original.ConvertToEntity();

            try
            {
                BusinessComponent.UpdateReservation(reservationEntity, originalEntity);
            }
            catch (LocalOptimisticConcurrencyException<Reservation> ex)
            {
                Reservation failed = ex.MergedEntity;
                throw new FaultException<ReservationDto>(failed.ConvertToDto());
            }
        }
        public void UpdateReservation(ReservationDto original, ReservationDto modified)
        {
            WriteActualMethod();
            var dbOrginal = original.ConvertToEntity();
            var dbModified = modified.ConvertToEntity();

            try
            {
                db.UpdateReservation(dbOrginal, dbModified);
            }
            catch (Exception e)
            {
                throw new FaultException<ReservationDto>(original);
            }
        }
 public void UpdateReservation(ReservationDto modifiedReservation, ReservationDto originalReservation)
 {
     WriteActualMethod();
     autoReservation.UpdateReservation(modifiedReservation.ConvertToEntity(), originalReservation.ConvertToEntity());
 }
 public void InsertReservation(ReservationDto newReservation)
 {
     WriteActualMethod();
     businessComponent.InsertReservation(newReservation.ConvertToEntity());
 }
 public void UpdateReservation(ReservationDto modified, ReservationDto original)
 {
     try
     {
         WriteActualMethod();
         businessComponent.UpdateReservation(modified.ConvertToEntity(), original.ConvertToEntity());
     }
     catch (Exception e)
     {
         throw new FaultException<ReservationDto>(modified, e.Message);
     }
 }
 public void deleteReservation(ReservationDto reservation)
 {
     WriteActualMethod();
     autoReservationBusinessComponent.deleteReservation(reservation.ConvertToEntity());
 }
 public ReservationDto addReservation(ReservationDto reservation)
 {
     WriteActualMethod();
     return autoReservationBusinessComponent.addReservation(reservation.ConvertToEntity()).ConvertToDto();
 }
 public void updateReservation(ReservationDto modified, ReservationDto original)
 {
     WriteActualMethod();
     try
     {
         autoReservationBusinessComponent.updateReservation(modified.ConvertToEntity(), original.ConvertToEntity());
     }
     catch (LocalOptimisticConcurrencyException<Reservation> e)
     {
         UpdateConcurrencyFault ucf = new UpdateConcurrencyFault();
         ucf.Message = e.Message;
         throw new FaultException<UpdateConcurrencyFault>(ucf);
     }
 }
 public void DeleteReservation(ReservationDto reservation)
 {
     WriteActualMethod();
     var dbResevation = reservation.ConvertToEntity();
     db.DeleteReservation(dbResevation);
 }
 public void UpdateReservation(ReservationDto original, ReservationDto modified )
 {
     WriteActualMethod();
     component.UpdateReservation(original.ConvertToEntity(), modified.ConvertToEntity());
 }
 public void InsertReservation(ReservationDto reservation)
 {
     WriteActualMethod();
     component.AddReservation(reservation.ConvertToEntity());
 }
 public void updateReservation(ReservationDto modified, ReservationDto original)
 {
     WriteActualMethod();
     UpdateFault myUpdateFault = new UpdateFault();
     try
     {
         target.updateReservation(modified.ConvertToEntity(), original.ConvertToEntity());
     }
     catch (DbUpdateConcurrencyException upex)
     {
         myUpdateFault.Result = true;
         myUpdateFault.ErrorMessage = "Update couldnt complete";
         myUpdateFault.ErrorDetails = upex.ToString();
         throw new FaultException<UpdateFault>(myUpdateFault, upex.ToString());
     }
 }
        public void deleteReservation(ReservationDto entity)
        {
            WriteActualMethod();

            target.deleteReservation(entity.ConvertToEntity());
        }
 public void UpdateReservation(ReservationDto original, ReservationDto modified)
 {
     WriteActualMethod();
     try
     {
         _businessComponent.UpdateReservation(original.ConvertToEntity(), modified.ConvertToEntity());
     }
     catch (LocalOptimisticConcurrencyException<Reservation> e)
     {
         var fault = new LocalOptimisticConcurrencyFault()
                   {
                       Message = e.Message
                   };
         throw new FaultException<LocalOptimisticConcurrencyFault>(fault);
     }
 }
 public void DeleteReservation(ReservationDto reservation)
 {
     WriteActualMethod();
     autoReservation.DeleteReservation(reservation.ConvertToEntity());
 }
 public void AddReservation(ReservationDto reservation)
 {
     WriteActualMethod();
     businessComponent.AddReservation(reservation.ConvertToEntity());
 }