In ASP.NET Core, the most common setup is characterized by having a standalone Startup class, responsible for bootstrapping the services needed by your application, as well as setting up the application pipeline.
What most users of ASP.NET Core do not realize, is that at runtime, the Startup instance is actually being resolved from the DI container. This allows you to control some interesting aspects of how your application is bootstrapped, which can be really important i.e. in integration testing scenarios.
Let’s have a look.