コード例 #1
0
 static MongoRepositoryContext() {
     settings = new MongoRepositorySettings();
     var url = new MongoUrl(ConfigurationManager.ConnectionStrings["SysDB"].ConnectionString);
     client = new MongoClient(url);
     server = client.GetServer();
     database = server.GetDatabase(url.DatabaseName);
 }
コード例 #2
0
        static MongoRepositoryContext()
        {
            settings = new MongoRepositorySettings();
            var url = new MongoUrl(ConfigurationManager.ConnectionStrings["SysDB"].ConnectionString);

            client   = new MongoClient(url);
            server   = client.GetServer();
            database = server.GetDatabase(url.DatabaseName);
        }