Translate FilterDefinition to regular json mongo query that i can run in a mongo shell

前端 未结 3 1283
时光说笑
时光说笑 2020-12-14 08:44

I have many complex queries that I sometimes wish to check directly against Mongo for debugging \\ explaining() purposes. With the newer 2.0+ c# driver, i\'m not sure how t

3条回答
  •  长情又很酷
    2020-12-14 09:23

    You are able to perform that using the collection's properties:

    var result = filter.Render(collection.DocumentSerializer,
                               collection.Settings.SerializerRegistry).ToString();
    

提交回复
热议问题