// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, MarsContext context) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } // Init db DBInitialiser.Initialize(context); // CORS app.UseCors(options => options.AllowAnyOrigin() .AllowAnyMethod() .AllowAnyHeader()); app.UseAuthentication(); app.UseMvc(); }
public PhotoController(MarsContext ctxt) { _context = ctxt; }