Hello everyone!
Note: I have been playing with MongoDB C# driver for quite some time but still cannot consider myself an expert.
I am trying to figure out how to programmatically extract the fields used when using linq query in the MongoDB C# drivers.
For example, I have a code working code
collection.AsQueryable().Where(c => c.Region == “AU” && c.Rank > 0 && c.Rank < 100).ToListAsync();
Is there anyway to extract from the resulting IMongoQueryable (or any other possible type casting) the fields used in the conditon? (For the given example, the result should be “Region” & “Rank”)
I cannot change the structure of the LINQ so far, nor can I change it to use Builder.Filter
Hoping for a positive response or even just a nudge in the right direction.
Thanks!