public async Task <FlightRecordIndexModel> SearchFilterPut([FromBody] FlightRecordIndexModel flightRecordIndexModel)
        {
            GetFilteredFlightsQuery getFilteredFlightsQuery = new GetFilteredFlightsQuery();

            getFilteredFlightsQuery.flightRecordIndexView = flightRecordIndexModel;
            var result = await _mediator.Send(getFilteredFlightsQuery);

            flightRecordIndexModel.FlightRecords.MarkNonValidFlight();
            return(result);
        }
        public async Task <FlightRecordIndexModel> FlightWithFilter()
        {
            _logger.LogInformation("FlightWithFilter");
            FlightRecordIndexModel flightRecordIndexModel = new FlightRecordIndexModel();

            GetAllFlightsQuery getAllFlights = new GetAllFlightsQuery();

            flightRecordIndexModel = await _mediator.Send(getAllFlights);

            flightRecordIndexModel.FilterModel = await FilterModelPut(flightRecordIndexModel.FilterModel);

            flightRecordIndexModel.FlightRecords.MarkNonValidFlight();
            return(flightRecordIndexModel);
        }