private string GetConnectionString(String name)
{
var cs = System.Configuration.ConfigurationManager.ConnectionStrings[name];
if (cs == null || String.IsNullOrWhiteSpace(cs.ConnectionString))
throw new ArgumentException(String.Format("The connection string '{0}' must be specified.", name));
return cs.ConnectionString;
}