// This method gets called by the runtime. Use this method to configure the HTTP request p ipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, AccessoriesDbContext dbContext) { dbContext.EnsureSeedDataForContext(); app.UseDeveloperExceptionPage(); app.UseStatusCodePages(); app.UseStaticFiles(); app.UseSession(); app.UseMvc(routes => { routes.MapRoute( name: "categoryfilter", template: "Home/{action}/{category?}", defaults: new { Controller = "Home", action = "index" }); routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); }
public OrderRepository(AccessoriesDbContext dbContext, ShoppingCart shoppingCart) { _dbContext = dbContext; _shoppingCart = shoppingCart; }