// 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(); }); }
// 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(); }); }
public VehiclesController(CWheelsDbContext cWheelDbContext) { _cWheelDbContext = cWheelDbContext; }
public ImagesController(CWheelsDbContext cWheelsDbContext) { _cWheelsDbContext = cWheelsDbContext; }
public AccountsController(CWheelsDbContext cWheelsDbContext, IConfiguration configuration) { _cWheelsDbContext = cWheelsDbContext; _configuration = configuration; _auth = new AuthService(_configuration); }
public CategoriesController(CWheelsDbContext cWheelsDbContext) { _cWheelsDbContext = cWheelsDbContext; }