public async Task <IActionResult> GetAllFlights() { var flights = await service.GetAllFlightsInfoAsync(); return(flights == null?NotFound("No departures found!") as IActionResult : Ok(mapper.Map <IEnumerable <FlightDTO> >(flights))); }