예제 #1
0
        /// <summary>
        /// 基础数据库连接
        /// </summary>
        /// <param name="mdb">mongo数据库</param>
        /// <param name="mcom">mongo连接地址</param>
        /// <param name="rhost">redis连接地址</param>
        /// <param name="rpw">redis连接密码</param>
        public DbConBase(String mdb, String mcom, String rhost, String rpw)
        {
            rcon = new RedisClient(rhost);
            rcon.Auth(rpw);
            var mClient = new MongoClient(mcom);
            var mServer = mClient.GetServer();

            mcon = mServer.GetDatabase(mdb);
            DbBasic.createTestHT(rcon);
            DbBasic.createRwHt(mcon);
        }
예제 #2
0
 public void renewTestNameTable()
 {
     DbBasic.createTestHT(rcon, true);
 }