예제 #1
0
        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();
        }
예제 #2
0
 public OrdersController(FlyHighContext context)
 {
     _context = context;
 }
예제 #3
0
 public TerminalsController(FlyHighContext context)
 {
     _context = context;
 }
예제 #4
0
 public SeatsController(FlyHighContext context)
 {
     _context = context;
 }
예제 #5
0
 public DestinationsController(FlyHighContext context)
 {
     _context = context;
 }
 public PlaneDepartmentsController(FlyHighContext context)
 {
     _context = context;
 }
예제 #7
0
 public CustomersController(FlyHighContext context)
 {
     _context = context;
 }
예제 #8
0
 public TicketsController(FlyHighContext context)
 {
     _context = context;
 }
예제 #9
0
 public PlanesController(FlyHighContext context)
 {
     _context = context;
 }
예제 #10
0
 public FlightsController(FlyHighContext context)
 {
     _context = context;
 }