public SeedDataBusiness( SpojDebugDbContext spojDebugDbContext, UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, RoleManager <IdentityRole> roleManager) { //_spojDebugDbContext = spojDebugDbContext; _userManager = userManager; //_signInManager = signInManager; _roleManager = roleManager; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, IAdminSettingService adminService, ISeedDataService seedDataService, SpojDebugDbContext dbContext) { dbContext.Database.Migrate(); app.UseHangfireDashboard(); app.UseHangfireServer(); if (env.IsDevelopment()) { app.UseBrowserLink(); app.UseDeveloperExceptionPage(); app.UseDatabaseErrorPage(); } else { app.UseExceptionHandler("/Home/Error"); } app.UseStaticFiles(); app.UseAuthentication(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); var monitor = JobStorage.Current.GetMonitoringApi(); seedDataService.InitData(); AppStartBackGroundJob(adminService, monitor); }