// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ICompany company, ILogger <Startup> logger) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseStaticFiles(); app.UseMvc(ConfigureRoutes); app.Run(async(context) => { var comp = company.GetCompanyName(); await context.Response.WriteAsync($"Campny {comp} Not found."); }); }