// 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); }
public TyresController(MotorcyclesContext context) { _context = context; }
public EnginesController(MotorcyclesContext context) { _context = context; }
public MotorcycleMakesController(MotorcyclesContext context) { _context = context; }
public BreakPadsController(MotorcyclesContext context) { _context = context; }