Beispiel #1
0
        public static void MongoFsConnect()
        {
            var strconn = "mongodb://" + MongoXml.GetMongoIp() + ":" + MongoXml.GetMongoPort();
            var server  = MongoServer.Create(strconn);

            _db = server[MongoXml.GetConfig()[2]];
        }
Beispiel #2
0
        public static void MongoConnection()
        {
            string connstr = @"Server=" + MongoXml.GetConfig()[0] + ":" + MongoXml.GetConfig()[1];

            _gMongo = new Mongo(connstr);
            _gMongo.Connect();
        }
Beispiel #3
0
 public static IMongoDatabase GetMongodb()
 {
     _gTest = _gMongo[MongoXml.GetConfig()[2]];
     return(_gTest);
 }