public void Configure(IApplicationBuilder app, IWebHostEnvironment env, CarSharingContext db) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseDefaultFiles(); app.UseStaticFiles(); app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }
public CarsController(CarSharingContext db) { _db = db; }