public Task Invoke(HttpContext context, IServiceProvider serviceProvider, CargoTransportationContext dbContext)
        {
            if (!context.Session.Keys.Contains("starting"))
            {
                DbInitializer.Initialize(dbContext);
                context.Session.SetString("starting", "Yes");
            }

            // Call the next delegate/middleware in the pipeline
            return(_next.Invoke(context));
        }
Example #2
0
 public CargoesController(CargoTransportationContext context)
 {
     _context = context;
 }
Example #3
0
 public FlightsController(CargoTransportationContext context)
 {
     _context = context;
 }