Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / .NET

Set the connection string for Entity Framework at runtime

1.00/5 (1 vote)
18 Nov 2011CPOL 12.1K  
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)