public void AddFlightRoute(string src, string dest) { using (var context = new Model1Container()) { var ariportRoute = new Flight_Route() { SourceCode = src, DestinationCode = dest }; context.AddToFlight_Route(ariportRoute); context.SaveChanges(); } }
/// <summary> /// Deprecated Method for adding a new object to the Flight_Route EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToFlight_Route(Flight_Route flight_Route) { base.AddObject("Flight_Route", flight_Route); }
/// <summary> /// Create a new Flight_Route object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="sourceCode">Initial value of the SourceCode property.</param> /// <param name="destinationCode">Initial value of the DestinationCode property.</param> public static Flight_Route CreateFlight_Route(global::System.Int32 id, global::System.String sourceCode, global::System.String destinationCode) { Flight_Route flight_Route = new Flight_Route(); flight_Route.Id = id; flight_Route.SourceCode = sourceCode; flight_Route.DestinationCode = destinationCode; return flight_Route; }