Exemplo n.º 1
0
        // 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;
 }
Exemplo n.º 3
0
 public AsteroidsController(SolarBodiesContext context)
 {
     this.context = context;
 }