public static DataAccess GetSqlClientWrapper(string connectionString, ICacheManager oCache, Log oLog) { try { DataAccess oDB = new DataAccess(oCache, oLog); oDB.m_sConnectionString = connectionString; oDB.m_eProvider = PROVIDER_TYPE.PROVIDER_SQLCLIENT; return oDB; } catch (DataAccessException ex) { throw ex; } catch (Exception ex) { throw new DataAccessException("Error inesperado al obtener el Wrapper.", ex); } }
public static DataAccess GetSqlClientWrapper(string dataSource, string initialCatalog, string userId, string password, int connectTimeout, string applicationName, string connectionLifeTime, string minPoolSize, string maxPoolSize, ICacheManager oCache, Log oLog) { try { DataAccess oDB = new DataAccess(oCache, oLog); oDB.m_sConnectionString = GetConnectionString(dataSource, initialCatalog, userId, password, connectTimeout, applicationName, connectionLifeTime, minPoolSize, maxPoolSize); oDB.m_eProvider = PROVIDER_TYPE.PROVIDER_SQLCLIENT; oDB.CommandTimeout = Convert.ToInt32(connectTimeout); return oDB; } catch (DataAccessException ex) { throw ex; } catch (Exception ex) { throw new DataAccessException("Error inesperado al obtener el Wrapper.", ex); } }