Ejemplo n.º 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, WheelsDBContext wheelsDBContext)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseHttpsRedirection();

            app.UseRouting();

            wheelsDBContext.Database.EnsureCreated();

            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });
        }
Ejemplo n.º 2
0
 public MakesController(WheelsDBContext context, IMapper mapper)
 {
     this.context = context;
     this.mapper  = mapper;
 }
Ejemplo n.º 3
0
 public VehiclesController(WheelsDBContext wheelsDBContext)
 {
     _wheelsDbContext = wheelsDBContext;
 }
 public FeaturesController(WheelsDBContext context, IMapper mapper)
 {
     this.mapper  = mapper;
     this.context = context;
 }