コード例 #1
0
        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();
            });
        }
コード例 #2
0
 public CarsController(CarSharingContext db)
 {
     _db = db;
 }