Maybe it is a simple question, but I stack on it and cannot go ahead.
I need to make a query to MongoDb via C# driver. I can easily generate a complex filter by using FilterDefinition myFilter ...
new FilterDefinition<BsonDocument> myFilter = { "$and": [{ "D20": { "$in": [1654, 1659 ] } }, { "D22": 1666 }] }; //That is just sample, creating filter logic more complex
But when I need to edit it and remove some clause(for ex { "D22": 1666 }) from it, don't have any clue how to do this by using only FilterDefinition, without converting to json or string.
Try this