常用方法
常用方法
常用方法
常用方法
internal Domain.Flight GetFlightByNumberOrThrow404(string flightNumber) { var flight = _flightRepository.GetByNumber(flightNumber); if (flight == null) { throw new NotFoundException($"Flight with number '{flightNumber}' was not found"); } return(flight); }