public TableController(Log4NetReaderContext context) { _context = context; }
public ValuesController(Log4NetReaderContext 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, Log4NetReaderContext context) { loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDebug(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseCors(builder => builder.WithOrigins("http://localhost:4200")); app.Use(async(c, next) => { await next(); if (c.Response.StatusCode == 404 && !Path.HasExtension(c.Request.Path.Value) && !c.Request.Path.Value.StartsWith("/api/")) { c.Request.Path = "/index.html"; await next(); } }); app.UseMvc(); app.UseStaticFiles(); // DbInitializer.Initialize(context); }