Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

read connection string from app config using C#

using System; 
using System.Configuration;

private string GetConnectionString()
{
    return ConfigurationManager.ConnectionStrings["MyContext"].ConnectionString;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #read #connection #string #app #config
ADD COMMENT
Topic
Name
7+4 =