public IActionResult GetTopTenNumberOfFlights() { var flights = flightsRepository.GetTopTenNumberOfFlights(); if (!ModelState.IsValid) { return(BadRequest(ModelState)); } return(Ok(flights.Result)); }