public static string GetConnectionString(ConnectableDB connectableDB) { var connectionString = ConfigHelpers.GetConfigString(m_connectionStrings[connectableDB]); if (string.IsNullOrEmpty(connectionString)) { var errorMessage = String.Format("Connection string for {0} not set in app.config", connectableDB.ToString()); SLog.log.Fatal(errorMessage); throw new ApplicationException(errorMessage); } return connectionString; }
public DBHelperBase(ConnectableDB connectableDB) { m_connectionString = GetConnectionString(connectableDB); }