Click here to Skip to main content
15,885,278 members
Articles / .NET
Alternative
Tip/Trick

Set the connection string for Entity Framework at runtime

Rate me:
Please Sign up or sign in to vote.
1.00/5 (1 vote)
18 Nov 2011CPOL 11.9K   2
The first instruction in .NET 4 becomes:string connectionString = System.Configuration.ConfigurationManager. AppSettings.Get("ConnectionString");

The first instruction in .NET 4 becomes:


C#
string connectionString = System.Configuration.ConfigurationManager.
  AppSettings.Get("ConnectionString");

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Belgium Belgium
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
Questionjust getting Pin
calamar88816-Dec-13 7:16
calamar88816-Dec-13 7:16 
GeneralMy vote of 1 Pin
Phil_Murray17-Jul-12 23:41
Phil_Murray17-Jul-12 23:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.