예제 #1
0
파일: Startup.cs 프로젝트: yvesdj/MotoDex
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, MotorcyclesContext context)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseCors(builder => builder.AllowAnyOrigin()
                        .AllowAnyMethod()
                        .AllowAnyHeader());

            app.UseHttpsRedirection();

            app.UseRouting();

            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });

            DbInitializer.Initialize(context);
        }
예제 #2
0
 public TyresController(MotorcyclesContext context)
 {
     _context = context;
 }
예제 #3
0
 public EnginesController(MotorcyclesContext context)
 {
     _context = context;
 }
예제 #4
0
 public MotorcycleMakesController(MotorcyclesContext context)
 {
     _context = context;
 }
예제 #5
0
 public BreakPadsController(MotorcyclesContext context)
 {
     _context = context;
 }