Beispiel #1
0
        public static void Test_MongoDB_FindAll_02 <T>(string collection)
        {
            Trace.WriteLine("Test_MongoDB_FindAll_02");
            MongoDatabase mdb = GetMongoDatabase();
            //MongoCollectionSettings<T> colSettings = new MongoCollectionSettings<T>(mdb, collection);
            //colSettings.ReadPreference.ReadPreferenceMode = ReadPreferenceMode.Nearest;
            //colSettings.WriteConcern = new WriteConcern();
            MongoCollection <T> mcollection = mdb.GetCollection <T>(collection);
            MongoCursor <T>     mcursor     = mcollection.FindAll();

            mcursor.SetLimit(10);
            //RunSource.CurrentRunSource.View(mcursor);
            mcursor.zView();
        }