public OracleQuerySession(DatabaseInfo databaseInfo) { this.databaseInfo = databaseInfo; this.dbParameterCreater = new DbParameterCreater(); #region "连接字符串解密" //苗建龙 修改 //var connectionStrings = ConfigurationManager.ConnectionStrings["shenHeDb"].ConnectionString; var connectionStrings = ConfigHelper.Instance.Get(databaseInfo.ConnectionStringName) ?? ConfigHelper.Instance.GetSection("DBConnectionString")[databaseInfo.ConnectionStringName]; //var connectionStrings = ConfigurationManager.AppSettings["shenHeDb"].ToString(); var connStr = new Infrastructure.SymmetricMethod().Decrypto(connectionStrings); if (!string.IsNullOrEmpty(connStr)) { connectionString = connStr; } else { connectionString = connectionStrings; } //dbProviderFactory = DbProviderFactories.GetFactory("Oracle.ManagedDataAccess.Client"); #endregion this.sqlLog = new SqlLog(databaseInfo); }
public MySqlQuerySession(DatabaseInfo databaseInfo) { this.databaseInfo = databaseInfo; this.dbParameterCreater = new DbParameterCreater(); connectionString = ConfigHelper.Instance.Get(databaseInfo.ConnectionStringName) ?? ConfigHelper.Instance.GetSection("DBConnectionString")[databaseInfo.ConnectionStringName]; this.sqlLog = new SqlLog(databaseInfo); }