public ProductController(KingPimDatabaseContext contex, UserManager <IdentityUser> UserManager, IDataRepository repository) { _userManager = UserManager; repo = repository; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, IIdentitySeeder identitySeeder, KingPimDatabaseContext ctx) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseStatusCodePages(); // felhantering implementation } else { app.UseExceptionHandler("/error.html"); app.UseStatusCodePagesWithReExecute("/Error/Error", "?statusCode={0}"); } app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseAuthentication(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Account}/{action=Login}/{id?}"); }); identitySeeder.CreateAdminAccountIFEmpty(); }
public VerticalNavBlockCatViewComponent(KingPimDatabaseContext context) { ctx = context; }
public DataRepository(KingPimDatabaseContext context, UserManager <IdentityUser> UserManager) { ctx = context; _userManager = UserManager; }