kubawavy
kubawavy

Reputation: 25

C# alternative for mongo find({ _id: {$in : list}})

C# alternative for mongo find({ _id: {$in : list}})

I need all the document having _id values in list

Upvotes: 0

Views: 49

Answers (1)

J.F.
J.F.

Reputation: 15215

You can try this code:

var filter = Builders<BsonDocument>.Filter.In("_id", list);
var result = yourCollection.Find(filter).ToList()

Upvotes: 1

Related Questions