Пример #1
0
 // Adding a server to the given context
 public static async Task <int> AddServer(FlightPlanDBContext _context, Server server)
 {
     _context.Add(server);
     return(await _context.SaveChangesAsync());
 }
Пример #2
0
 // Send flightPlan and flight to the context given
 public static async Task <int> AddAFlightPlanAndAFlight(FlightPlanDBContext _context, FlightPlan flightPlan, Flight flight)
 {
     _context.Add(flightPlan);
     _context.Add(flight);
     return(await _context.SaveChangesAsync());
 }