public CzadsbController(ILogger <CzadsbController> logger, CzadsbRedis redis, CzadsbDbContext context, IServiceScopeFactory factory, IEnumerable <IManagementUtil> managementUtils)
 {
     _logger          = logger;
     _redis           = redis;
     _context         = context;
     _factory         = factory;
     _managementUtils = managementUtils.ToList();
 }
 public RegisterModel(
     UserManager <User> userManager,
     SignInManager <User> signInManager,
     ILogger <RegisterModel> logger,
     IEmailSender emailSender,
     CzadsbDbContext context)
 {
     _userManager   = userManager;
     _signInManager = signInManager;
     _logger        = logger;
     _emailSender   = emailSender;
     _context       = context;
 }
Beispiel #3
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, CzadsbDbContext context, RoleManager <IdentityRole> roleManager, UserManager <User> userManager)
        {
            context.Database.Migrate();
            CreateSuperAdmin(roleManager, userManager);

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseExceptionHandler("/Home/Error");
                // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
                app.UseHsts();
            }

            app.UseHttpsRedirection();
            app.UseStaticFiles();
            app.UseRouting();

            app.UseAuthentication();
            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllerRoute(
                    name: "areas",
                    pattern: "{area:exists}/{controller=Czadsb}/{action=Index}/{id?}"
                    );
                endpoints.MapControllerRoute(
                    name: "default",
                    pattern: "{controller=Czadsb}/{action=Index}/{id?}"
                    );
                endpoints.MapHub <CzadsbHub>("/signalr");
                endpoints.MapRazorPages();
            });
        }
 public PlanesController(CzadsbDbContext context, CzadsbRedis redis)
 {
     _context = context;
     _redis   = redis;
 }
 public StationsController(CzadsbDbContext context, CzadsbRedis redis)
 {
     _context = context;
     _redis   = redis;
 }
 public AdminController(IEnumerable <IManagementUtil> managementUtils, CzadsbDbContext context)
 {
     _managementUtils = managementUtils.ToList();
     _context         = context;
 }
Beispiel #7
0
 public OpenskyParserUtil(CzadsbDbContext context)
 {
     Title    = "Import CSV OpenSky";
     _context = context;
 }