How can I get the connection string for the SQL Express database specified in LINQPad?
Is there an easy way to get the database connection string specified in the LINQPad connection window (other than using the Visual Studio Object Explorer)?
+7
tuncalik
source
to share
2 answers
Creating sgmoore comment in response:
try it this.Connection.ConnectionString.Dump();
+9
Jay walker
source
to share
In LinqPad 5, if program "C # " is selected in the Language dropdown and database is selected in the Connection dropdown , you can get the string using
string c = LINQPad.Util.CurrentDataContext.Connection.ConnectionString;
0
Mike brady
source
to share