1

Could you please help me with query in c#.

I have Collection "Test" in MongoDB.

In this collection every BsonDocument has 1 custom field "FCount".
In C# I have method he takes _id.

I'm create properly query in Mongo Console

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

But in C#:

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

So my question: How I can get FCount in C# method?

Sergio Tulentsev
  • 226,338
  • 43
  • 373
  • 367
Viktor Ischenko
  • 199
  • 1
  • 8

0 Answers0