Esempio n. 1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, FurnitureDbContext furnitureDbContext)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseHttpsRedirection();
            app.UseStaticFiles();
            app.UseRouting();
            app.UseAuthentication();
            app.UseAuthorization();
            furnitureDbContext.Database.EnsureCreated();


            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });
        }
Esempio n. 2
0
 public ShoppingCartItemsController(FurnitureDbContext dbContext)
 {
     _dbContext = dbContext;
 }
 public ProductsController(FurnitureDbContext dbContext)
 {
     _dbContext = dbContext;
 }
 public ComplaintsController(FurnitureDbContext dbContext)
 {
     _dbContext = dbContext;
 }
 public CategoriesController(FurnitureDbContext dbContext)
 {
     _dbContext = dbContext;
 }
Esempio n. 6
0
 public AccountsController(FurnitureDbContext dbContext, IConfiguration configuration)
 {
     _configuration = configuration;
     _auth          = new AuthService(_configuration);
     _dbContext     = dbContext;
 }
 public OrdersController(FurnitureDbContext dbContext)
 {
     _dbContext = dbContext;
 }