public void deleteflight(string id) { Flightplan p = flights.Where(x => x.FlightPlanId == id).FirstOrDefault(); if (p == null) { throw new Exception("id not found "); } else { flights.Remove(p); } }
public Flightplan getbyid(String id) { Flightplan p = flights.Where(x => x.FlightPlanId == id).FirstOrDefault(); if (p == null) { return(null); throw new Exception("id not found "); } else { return(p); } }
public void addflight(Flightplan f) { flights.Add(f); }