public static DbFactoryBase Instance(IDbCommand cmd) { DbFactoryBase result = Instance(DbTypeChecker.GetDatabaseType(cmd)); result.cmd = cmd; return(result); }
public static DbFactoryBase Instance(String connectionString) { DbFactoryBase result = Instance(DbTypeChecker.GetDatabaseType(connectionString)); result.cn = result.GetConnection(connectionString); return(result); }
public static DbFactoryBase Instance(IDbConnection cn) { DbFactoryBase result = Instance(DbTypeChecker.GetDatabaseType(cn)); result.cn = cn; return(result); }
private static DatabaseType getDbType(String dbname, String connectionString, DbConfig result) { foreach (KeyValuePair <String, String> kv in result.DbType) { if (kv.Key == dbname) { return(DbTypeChecker.GetFromString(kv.Value)); } } DatabaseType dbtype = DbTypeChecker.GetDatabaseType(connectionString); return(dbtype); }