// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure( IApplicationBuilder app, IHostingEnvironment env, MchneContext dbContext, UserManager <AppUser> userManager, RoleManager <IdentityRole> roleManager, ApplicationDbContext appContext, IMapper mapper, IConfiguration config) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } DbInitializer.InitializeSuperUser(appContext, userManager, roleManager, mapper, config); app.UseCors("CorsPolicy"); app.UseAuthentication(); app.UseMvc(); // ===== Create tables ====== dbContext.Database.EnsureCreated(); }
public ChaptersController(MchneContext context) { _context = context; }
public NovelsController(MchneContext context) { _context = context; }