Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

mongodb c# batch find

var filter = new BsonDocument();
var options = new FindOptions<BsonDocument>
{
    // Get 100 docs at a time
    BatchSize = 100
};

using (var cursor = await test.FindAsync(filter, options))
{
    await cursor.ForEachAsync(doc =>
    {
        // process doc
    });
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mongodb #batch #find
ADD COMMENT
Topic
Name
7+5 =