// 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, DbSeed seeder) { loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDebug(); app.UseStaticFiles(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseDatabaseErrorPage(); loggerFactory.AddDebug(LogLevel.Information); } else { app.UseExceptionHandler("/Api/Error"); loggerFactory.AddDebug(LogLevel.Information); } app.UseMvc(); seeder.EnsureSeedData().Wait(); }