public BooksController(ComicBoxContext context) { _context = context; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, ComicBoxContext context) { loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDebug(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions { HotModuleReplacement = true }); } else { app.UseExceptionHandler("/Home/Error"); } app.UseStaticFiles(); app.UseMvc(routes => { //routes.MapRoute( // name: "default", // template: "{controller=Home}/{action=Index}/{id?}"); //routes.MapSpaFallbackRoute( // name: "spa-fallback", // defaults: new { controller = "Home", action = "Index" }); }); DbInitializer.Initialize(context); }
public IssuesController(ComicBoxContext context) { _context = context; }