public void deleteReservation(int id) { WriteActualMethod(); try { _reservationManager.DeleteReservation(id); } catch (InvalidOperationException) { OutOfRangeFault fault = new OutOfRangeFault() { Operation = "delete" }; throw new FaultException <OutOfRangeFault>(fault); } }
public ReservationDto ReadReservationDto(int id) { WriteActualMethod(); try { return(_reservationManager.GetReservationById(id).ConvertToDto()); } catch (InvalidOperationException) { OutOfRangeFault fault = new OutOfRangeFault() { Operation = "Read" }; throw new FaultException <OutOfRangeFault>(fault); } }
public KundeDto ReadKundeDto(int kundeId) { WriteActualMethod(); try { return(DtoConverter.ConvertToDto(_kundenManager.GetKundeById(kundeId))); } catch (InvalidOperationException) { OutOfRangeFault fault = new OutOfRangeFault() { Operation = "Read" }; throw new FaultException <OutOfRangeFault>(fault); } }
public AutoDto ReadAutoDto(int autoId) { WriteActualMethod(); try { return(DtoConverter.ConvertToDto(_autoManager.GetAutoById(autoId))); } catch (InvalidOperationException) { OutOfRangeFault fault = new OutOfRangeFault() { Operation = "Read" }; throw new FaultException <OutOfRangeFault>(fault); } }
public void updateReservation(ReservationDto reservation) { WriteActualMethod(); try { _reservationManager.UpdateReservation(reservation.ConvertToEntity()); } catch (InvalidOperationException) { OutOfRangeFault fault = new OutOfRangeFault { Operation = "update" }; throw new FaultException <OutOfRangeFault>(fault); } catch (DbUpdateConcurrencyException) { ConcurrencyFault fault = new ConcurrencyFault(); throw new FaultException <ConcurrencyFault>(fault); } catch (AutoUnavailableException) { AutoUnavailableFault fault = new AutoUnavailableFault() { Operation = "update" }; throw new FaultException <AutoUnavailableFault>(fault); } catch (InvalidDateRangeException) { InvalidDateRangeFault fault = new InvalidDateRangeFault() { Operation = "update" }; throw new FaultException <InvalidDateRangeFault>(fault); } }
public void updateKunde(KundeDto kunde) { WriteActualMethod(); try { _kundenManager.UpdateKunde(kunde.ConvertToEntity()); } catch (InvalidOperationException) { OutOfRangeFault fault = new OutOfRangeFault { Operation = "update" }; throw new FaultException <OutOfRangeFault>(fault); } catch (DbUpdateConcurrencyException) { ConcurrencyFault fault = new ConcurrencyFault(); throw new FaultException <ConcurrencyFault>(fault); } }
public void UpdateAuto(AutoDto auto) { WriteActualMethod(); try { _autoManager.UpdateAuto(auto.ConvertToEntity()); } catch (InvalidOperationException) { OutOfRangeFault fault = new OutOfRangeFault { Operation = "update" }; throw new FaultException <OutOfRangeFault>(fault); } catch (DbUpdateConcurrencyException) { ConcurrencyFault fault = new ConcurrencyFault(); throw new FaultException <ConcurrencyFault>(fault); } }