Update mongodb

This commit is contained in:
sunkaixuan
2025-05-02 14:30:13 +08:00
parent 1a4a5f6d02
commit df4460c5a9
5 changed files with 331 additions and 215 deletions

View File

@@ -1,6 +1,7 @@
using MongoDB.Bson;
using MongoDB.Driver;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data.Common;
using System.Text;
@@ -35,9 +36,8 @@ namespace MongoDb.Ado.data
if (projection != null)
findFluent = findFluent.Project<BsonDocument>(projection);
var cursor = findFluent.ToCursor(); // 已包含 filter + projection 的结果
return new MongoDbIAsyncCursorDataReader(cursor); // 你要确保这个类支持逐行读取 BsonDocument
var cursor = findFluent.ToEnumerable();
return new MongoDbBsonDocumentDataReader(cursor); // 你要确保这个类支持逐行读取 BsonDocument
}
}
}