コード例 #1
0
        public async Task <bool> Handle(HotelReservationDeleteCommand request, CancellationToken cancellationToken)
        {
            var flight = await _flightRepository.GetById(request.HotelReservationId);

            if (flight == null)
            {
                return(false);
            }

            await _flightRepository.DeleteById(request.HotelReservationId);

            return(true);
        }
コード例 #2
0
 public Task <HotelReservation> Handle(HotelReservationLoadByIdQuery request, CancellationToken cancellationToken)
 {
     return(_repository.GetById(request.HotelReservationId));
 }