MongoDB - can't use .explain() to get query info in C# code?

前端 未结 1 1583
我在风中等你
我在风中等你 2021-01-19 20:55

I\'m using Mongo 2.2. How can I access the query info using C#?

Currently have the following to get my data:

 var records = _collect         


        
相关标签:
1条回答
  • 2021-01-19 21:34

    There is .Explain() method of MongoCursor class resulting from FindAs() method of MongoCollection class. I found an answer from this link.

    var qLinq = Query<T>.Where(x => x.name=="jim");
    
    var exp = Collection.FindAs<T>(qLinq).Explain()
    
    0 讨论(0)
提交回复
热议问题