I am developing an application and that there is an option to set a connection string based on the BaseURL. Eg: If my URL is .com then from one default DB's table it will get the whole connection string and work the whole site based on that also same for all other sites.
I am using Entity Framework Core to get data and post data to the appropriate server but I am unable to configure that basically, I have a concept of using my product as a service for other applications so I have to give an iframe with that UniqueID and in DB it stores the connection string for that application.
When the user wants to access from an iFrame then it is easily accessed to their DB and their features that developed in our product.
I tried to configure the DbContext OnConfiguring method but it gives me an exception in the program file for use before initialization.
Technology: .Net Core(v5.0), Entity Framework Core
If anyone has an idea about this then please let me know it helps me a lot.