// The methood check the how much flights we have in our data base right now. private int SizeFlights() { // Check the time now. DateTime current = DateTime.Now; string date = current.ToString("yyyy-MM-ddTHH:mm:ss") + "Z"; List <Flights> flightsNow = new List <Flights>(); flightsNow = dataBase.GetFlightsByDateTime(date); if (flightsNow == null) { return(0); } return(flightsNow.Count()); }