예제 #1
0
 public MongoCollectionManager_v1(XElement xe)
 {
     _serverName     = xe.zXPathExplicitValue("MongoServer");
     _databaseName   = xe.zXPathExplicitValue("MongoDatabase");
     _collectionName = xe.zXPathExplicitValue("MongoCollection");
     _itemName       = xe.zXPathValue("MongoDocumentItemName");
     //_idGenerator = new MongoIdGenerator_v1(_server, _database);
     _idGenerator = new MongoIntIdGenerator_v2(_collectionName, _databaseName, _serverName);
 }
예제 #2
0
 // Func<TKey, QueryDocument> queryKey
 public MongoCollectionManager_v1(string serverName, string databaseName, string collectionName, string itemName = null)
 {
     _serverName     = serverName;
     _databaseName   = databaseName;
     _collectionName = collectionName;
     _itemName       = itemName;
     //_idGenerator = new MongoIdGenerator_v1(server, database);
     _idGenerator = new MongoIntIdGenerator_v2(collectionName, databaseName, serverName);
 }