-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.0
-
Component/s: None
-
(copied to CRM)
Using the new C# 2.0 driver, I cannot seem to figure out how to run an Explain query.
An example query is:
var obj = await someCollection.Find(Builders<SomeType>.Filter.Eq("field", "value")).FirstOrDefaultAsync();
someCollection is of type IMongoCollection<SomeType>.
the Find command returns an IFindFluent<SomeType,SomeType> but this object has no Explain() method.
I am importing the following namespaces:
using MongoDB.Bson; using MongoDB.Driver;
I am trying to do this without using the legacy driver but cannot figure out how to do it even with the legacy driver without creating a legacy connection since my Database connection returns an IMongoDatabase and none of the find options returns a MongoQuery.
- is related to
-
CSHARP-1323 Need an easier way to change the result type of a query without using Project.
- Closed