protected InitCollection ( string name ) : IMongoCollection | ||
name | string | |
return | IMongoCollection |
protected IMongoCollection InitCollection(string name)
{
IMongoCollection col = DB[name];
col.MetaData.CreateIndex(new Document(){{"x", IndexOrder.Ascending}}, true);
for(int x = 0; x < 5; x++){
col.Insert(new Document(){{"x", x}, {"y", 1}});
}
return col;
}