I am looking to parse the webconfig to extract all connections strings. From this, I am trying to build up a list of Catalogs, connection strings, and states of the db's by polling the sys.databases table to get the state.
The problem I am coming across is the 2/3 of the connection strings are entityConnectionStrings as we used dbfirst (EDMX's) to get our contexts. and the third is the integrated sqllite connection string that is auto generated when the project is built.
using ConfigurationManager.ConnectionStrings
I am able to retrieve all 3 strings, but how can I tell the difference between them, or is there a way to cast the EntityConnectionStrings
to SQLConnectionsStrings
so I can use the SqlConnectionStringBuilder
to parse the parts required