public static void Main(string[] args) { var host = BuildWebHost(args); using (var scope = host.Services.CreateScope()) { var services = scope.ServiceProvider; FlyHighContext context = services.GetRequiredService <FlyHighContext>(); if (context.Flight.Count() == 0) { for (int i = 0; i < 20; i++) { context.Add(new Flight()); } context.SaveChanges(); } } host.Run(); }
public OrdersController(FlyHighContext context) { _context = context; }
public TerminalsController(FlyHighContext context) { _context = context; }
public SeatsController(FlyHighContext context) { _context = context; }
public DestinationsController(FlyHighContext context) { _context = context; }
public PlaneDepartmentsController(FlyHighContext context) { _context = context; }
public CustomersController(FlyHighContext context) { _context = context; }
public TicketsController(FlyHighContext context) { _context = context; }
public PlanesController(FlyHighContext context) { _context = context; }
public FlightsController(FlyHighContext context) { _context = context; }