public async Task <FlightDto> GetEntityAsync(Guid entityId) { var data = await _repository.GetEntityAsync(entityId); if (data == null) { throw new NotFoundException(); } return(_mapper.Map <Flight, FlightDto>(data)); }