コード例 #1
0
        public static DbFactoryBase Instance(IDbCommand cmd)
        {
            DbFactoryBase result = Instance(DbTypeChecker.GetDatabaseType(cmd));

            result.cmd = cmd;
            return(result);
        }
コード例 #2
0
        public static DbFactoryBase Instance(String connectionString)
        {
            DbFactoryBase result = Instance(DbTypeChecker.GetDatabaseType(connectionString));

            result.cn = result.GetConnection(connectionString);
            return(result);
        }
コード例 #3
0
        public static DbFactoryBase Instance(IDbConnection cn)
        {
            DbFactoryBase result = Instance(DbTypeChecker.GetDatabaseType(cn));

            result.cn = cn;
            return(result);
        }
コード例 #4
0
        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);
        }