// 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) { app.UseDeveloperExceptionPage(); app.UseStatusCodePages(); app.UseStaticFiles(); //habilitacion del middleware para sesiones que CarroCompras utilizara app.UseSession(); // configuracion de routing app.UseMvcWithDefaultRoute(); app.UseMvc(routes => { routes.MapRoute( name: "filtrocatproductos", template: "Productos/{action}/{categoriasProductos?}", defaults: new { Controller = "Productos", action = "ListaProductos" }); routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); routes.MapRoute( name: "Detalles", template: "{controller=ProductosController}/{action=Detalles}/{id?}"); routes.MapRoute( name: "ListaProductos", template: "{controller=ProductosController}/{action=ListaProductos}/{id?}"); }); DataInicio.AgregarData(app); DataUsuarios.AgregarData(app); }
// 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) { app.UseStatusCodePages(); app.UseStaticFiles(); app.UseMvcWithDefaultRoute(); app.UseDeveloperExceptionPage(); DataInicio.AgregarData(app); }