// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, SolarBodiesContext bodiesContext) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } // Shows UseCors with CorsPolicyBuilder. app.UseCors(builder => builder .AllowAnyOrigin() .AllowAnyHeader() .AllowAnyMethod()); app.UseMvc(); DBInitializer.Initialize(bodiesContext); }
public SolarBodiesController(SolarBodiesContext context) { this.context = context; }
public AsteroidsController(SolarBodiesContext context) { this.context = context; }