Currently some of the required configurations are run in IStartupTasks. It could be better if we would use hosted services to run these tasks.
IStartupTasks were used because we wanted to run tasks (like endpoint initilization) before starting ApiFramework. With a newer version of ASP.NET Core hosted services are run before the application starts so we could run the tasks in those.