Reputation: 25
C# alternative for mongo find({ _id: {$in : list}})
I need all the document having _id values in list
Upvotes: 0
Views: 49
Reputation: 15215
You can try this code:
var filter = Builders<BsonDocument>.Filter.In("_id", list);
var result = yourCollection.Find(filter).ToList()
Upvotes: 1