Connecting API to a database dynamically based env from UI

Apr 22 2020 3:19 AM
I am building an Angular application which would have a dropdown to select the environment from the screen like DEV/SIT/UAT etc... and call API with the same code to connect to Database based on the selected environment and fetch the results.
 
Eg. Consider there is a ErrorLog tables in different databases corresponding to DEV/SIT/UAT and i have the errorid and the environment on which the error occurred in hand. I want to select the environment on which the error occurred from the dropdown and fetch the details fo the error from the corresponding database.
 
Front End : Angular 9
BackEnd : dotnet core API with SQL Server 

Answers (1)