예제 #1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, VehiclesProjectDbContext vehiclesProjectDbContext)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseHsts();
            }

            app.UseDefaultFiles();
            app.UseStaticFiles();
            app.UseHttpsRedirection();
            app.UseAuthentication();
            vehiclesProjectDbContext.Database.EnsureCreated();
            app.UseMvc();
        }
예제 #2
0
 public AccountsController(VehiclesProjectDbContext dbContext, IConfiguration configuration)
 {
     _dbContext     = dbContext;
     _configuration = configuration;
     _auth          = new AuthService(_configuration);
 }
 public CategoriesController(VehiclesProjectDbContext dbContext)
 {
     _dbContext = dbContext;
 }
예제 #4
0
 public ImagesController(VehiclesProjectDbContext dbContext)
 {
     _dbContext = dbContext;
 }