Example #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, CWheelsDbContext cWheelsDbContext)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseHttpsRedirection();

            app.UseRouting();

            //cWheelsDbContext.Database.EnsureCreated();
            app.UseAuthentication();
            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });
        }
Example #2
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, CWheelsDbContext cWheelsDbContext)
        {
            app.UseMiddleware <ExceptionMiddleware>();

            app.UseHttpsRedirection();

            app.UseStaticFiles();

            app.UseRouting();

            app.UseAuthentication();

            app.UseAuthorization();

            app.UseSwaggerDocumentation();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });
        }
Example #3
0
 public VehiclesController(CWheelsDbContext cWheelDbContext)
 {
     _cWheelDbContext = cWheelDbContext;
 }
Example #4
0
 public ImagesController(CWheelsDbContext cWheelsDbContext)
 {
     _cWheelsDbContext = cWheelsDbContext;
 }
Example #5
0
 public AccountsController(CWheelsDbContext cWheelsDbContext, IConfiguration configuration)
 {
     _cWheelsDbContext = cWheelsDbContext;
     _configuration    = configuration;
     _auth             = new AuthService(_configuration);
 }
Example #6
0
 public CategoriesController(CWheelsDbContext cWheelsDbContext)
 {
     _cWheelsDbContext = cWheelsDbContext;
 }