// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, ParkingIdentityInitializer identitySeeder, ParkingDbInitializer seeder) { loggerFactory.AddConsole(_config.GetSection("Logging")); loggerFactory.AddDebug(); if (_env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseBrowserLink(); } else { app.UseExceptionHandler("/Home/Error"); } app.UseIdentity(); app.UseDefaultFiles(); app.UseStaticFiles(); app.UseMvc(); seeder.Seed().Wait(); identitySeeder.Seed().Wait(); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, ParkingIdentityInitializer identitySeeder, ParkingDbInitializer seeder) { loggerFactory.AddConsole(_config.GetSection("Logging")); loggerFactory.AddDebug(); if (_env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseBrowserLink(); app.UseDatabaseErrorPage(); } else { app.UseExceptionHandler("/Error"); } app.UseAuthentication(); app.UseDefaultFiles(); app.UseStaticFiles(); app.UseMvc(routes => routes.MapRoute( name: "default", template: "{controller}/{action=Index}/{id?}")); //Sample data pre-seed seeder.Seed().Wait(); identitySeeder.Seed().Wait(); }