public AccountController(UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager, MebelContext context, SignInManager <ApplicationUser> signInManager, IHostingEnvironment env) { _context = context; _userManager = userManager; _roleManager = roleManager; _signInManager = signInManager; _env = env; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, MebelContext context, UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Home/Error"); } app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseCookiePolicy(); app.UseAuthentication(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); app.UseMvc(routes => { routes.MapRoute( name: "MyAreas", template: "{area=Admin}/{controller=Admin}/{action=Index}/{id?}"); }); app.UseMvc(routes => { routes.MapRoute( name: "MyAreas", template: "{area=Admin}/{controller=Category}/{action=Index}/{id?}"); }); DbInitializor.Seed(context, roleManager, userManager, Configuration).Wait(); }
public HomeController(MebelContext context, UserManager <ApplicationUser> userManager) { _userManager = userManager; _context = context; }
public CategoryController(MebelContext context) { _context = context; }