Connection to SQL Database Template
using (IDbConnection connection = new System.Data.SqlClient.SqlConnection (Helper.CnnVal("SampleDB")) )
{
}
PS:
public static class Helper
{
public static string CnnVal(string name)
{
return ConfigurationManager.ConnectionStrings[name].ConnectionString;
}
}