public IHttpActionResult GetFlightsByFilter(string orgCoun = "", string destCoun = "", string airline = "", int flightNum = 0, string searchType = "") { if (orgCoun == null) { orgCoun = ""; } if (destCoun == null) { destCoun = ""; } if (airline == null) { airline = ""; } IList <FlightView> flightsByFilter = anonymous.GetFlightsViewByFilter(flightNum, orgCoun, destCoun, airline, searchType); if (flightsByFilter.Count == 0) { Console.WriteLine("No flights were found to match the search terms"); return(NotFound()); } return(Ok(flightsByFilter)); }