C# MongoDB - Pull an item from a nested document's array based on an ID
问题 We've been struggling for hours on a query that seems easy to us and that we made through Robo 3T... The issue is now to convert it into C# and we just can't find the way and we don't even understand why it doesn't work. We have the following query: db.getCollection('UserCollection').update({"User.Contacts._id": ObjectId("xxx")}, { $pull: { "User.Contacts": { "_id": {$in:[ObjectId("xxx")]} } } }) Now that our query works, we try to translate it in c# and we reached that point so far and we