// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IApiVersionDescriptionProvider provider) { BackendTestApiConfiguration.Configure(app, provider, host => { if (env.IsDevelopment()) { host.UseDeveloperExceptionPage(); } else { host.UseExceptionHandler("/home/error"); } host.UseStaticFiles(); host.UseMiddleware <LogContextMiddleware>(); // This should go in this order return(host); }); }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { BackendTestApiConfiguration.ConfigureServices(services, Environment, Configuration); }