// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, VolvoContext context) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } InicializaDb.Initialize(context); app.UseMvc(); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ItemContext oContexto) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseRouting(); app.UseCors(config => { config.AllowAnyHeader(); config.AllowAnyMethod(); config.AllowAnyOrigin(); }); app.UseMvc(); InicializaDb.Initialize(oContexto); }