1

你能帮我用c#查询吗?

我在 MongoDB 中有集合“测试”。

在这个集合中,每个 BsonDocument 都有 1 个自定义字段“FCount”。
在 C# 中,我有他采用 _id 的方法。

我在 Mongo 控制台中创建了正确的查询

db.Test.find({_id: "1bvg4223"},{FCount: 1, _id: null}).pretty()

但在 C# 中:

database.GetCollection("Test").Find(Query.EQ("_id", "1bvg4223")) 
// I don`t know how i can get field "FCount" in this query

所以我的问题是:如何在 C# 方法中获取 FCount?

4

0 回答 0