public async Task <bool> Handle(HotelReservationUpdateCommand request, CancellationToken cancellationToken) { try { var flightDb = _flightRepository.GetAll().Result.First(x => x.Id == request.Id); _mapper.Map(request, flightDb); _flightRepository.Update(flightDb); return(true); } catch { return(false); } }
public Task <List <HotelReservation> > Handle(HotelReservationLoadAllQuery request, CancellationToken cancellationToken) { return(_repository.GetAll()); }