I am getting the above error and I realize why, but the odd behavior I see that it only happens in our Dev environment and not in for example our staging or Production environment and it is the exact same code. In the startup there is :
services.AddSingleton<ExcahngeService>();
services.AddScoped<ITradingService, TradingService>();
This throws the error: "cannot consume a scoped service from singleton"
but it only happens in a development environment and it is the same code in all environments
Could this be due to a timing issue, where the environment is slower ?