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
database database-connection linqpad connection-string


source to share


2 answers


Creating sgmoore comment in response:



try it this.Connection.ConnectionString.Dump();

+9


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


source to share







All Articles
Loading...
X
Show
Funny
Dev
Pics