Mongodb and csharp
De Banane Atomic
Aller à la navigationAller à la recherche
Access to a collection
var mongoClient = new MongoClient("MONGODB_CONNECTION_STRING"); var collection = mongoClient.GetDatabase("DB_NAME").GetCollection<Collection>("COLLECTION_NAME"); |
Filter
var builder = Builders<MyClass>.Filter; var filter = builder.In(x => x.Property1, Ids); // filter by Property1 in the Ids list |