Hi there, i wonder if there is a way to pass the connection string which is written in the "appsettings.json" of a web api as an argument during a call from a PB app (i.e. maybe inside the url of a restclient call).
For example i have two ASA connection strings configured like this:
{
"Logging": {
"LogLevel": {
"Default": "Warning"
}
},
"AllowedHosts": "*",
"ConnectionStrings": {
"start2": "Dsn=start2;uid=dba;pwd=sql",
"s2": "Dsn=s2;uid=dba;pwd=sql"
}
}
in the Startup.cs i've configured the DataContext like this:
// Note: Replace "ContextName" with the configured context name; replace "key" with the database connection name that exists in appsettings.json. The sample code is as follows:
services.AddDataContext
what i would like to do is to use "start2" or "s2" connection strings dynamically according to some arguments passed
inv_RestClient.sendgetrequest("http://xxx.xxx.xxx.xxx:82/api/dayfat/retrievedsdata?dataoggi=2019-03-29", ls_response)
tia,
simone
This is also a similar topic for your reference:
https://community.appeon.com/index.php/qna/q-a/dynamic-connections-with-snapobjects
Regards,
Logan