// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, RidersContext context) { context.Database.Migrate(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } //app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthentication(); app.UseAuthorization(); app.UseCors(x => x.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader()); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }
public RideRepository(RidersContext RidersContext) { this.RidersContext = RidersContext; }
public RidesController(RidersContext context, Infrastructure.IRideRepository Repo) { _context = context; this.Repo = Repo; }