Good Day,
I have two connection strings defined in my web.config file.
<connectionStrings>
<add name="AppDb" connectionString="CONNECTION-STRING1"/>
<add name="LaptopDb" connectionString="CONNECTION-STRING2" />
</connectionStrings>
When I am working on my desktop, I want to use the connection string "AppDb". When I am working on my laptop, I want to use the connection string "LaptopDb". I don't want to comment out the line on the connection string everytime I work on a different machine.
I know that I can programatically do this. I'm just trying to figure out the best way.
Something like:
if (machineName == desktop)
use AppDb
else
use LaptopDb
but I don't like this approach. Is there something else I can test on?