public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, IServiceProvider serviceProvider) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseStatusCodePages(); } else { app.UseExceptionHandler("/Error"); } app.UseStaticFiles(); app.UseSession(); app.UseAuthentication(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Product}/{action=List}/{id?}"); }); DefaultData.EnsurePopulated(app); }