You can get the latest stable release from the official Nuget.org feed or from our github releases page.
using MongoDB.Bson;
using MongoDB.Driver;var client = new MongoClient("mongodb://localhost:27017");
var database = client.GetDatabase("foo");
var collection = database.GetCollection<BsonDocument>("bar");
await collection.InsertOneAsync(new BsonDocument("Name", "Jack"));
var list = await collection.Find(new BsonDocument("Name", "Jack"))
.ToListAsync();
foreach(var document in list)
{
Console.WriteLine(document["Name"]);
}using MongoDB.Bson;
using MongoDB.Driver;public class Person
{
public ObjectId Id { get; set; }
public string Name { get; set; }
}var client = new MongoClient("mongodb://localhost:27017");
var database = client.GetDatabase("foo");
var collection = database.GetCollection<Person>("bar");
await collection.InsertOneAsync(new Person { Name = "Jack" });
var list = await collection.Find(x => x.Name == "Jack")
.ToListAsync();
foreach(var person in list)
{
Console.WriteLine(person.Name);
}If you’ve identified a security vulnerability in a driver or any other MongoDB project, please report it according to the instructions here.
Please see our guidelines for contributing to the driver.
- Boris Dogadov [email protected]
- James Kovacs [email protected]
- Oleksandr Poliakov [email protected]
- Robert Stam [email protected]
- Alexander Aramov https://github.com/alex687
- Bar Arnon https://github.com/I3arnon
- Wan Bachtiar https://github.com/sindbach
- Mark Benvenuto https://github.com/markbenvenuto
- Brian Buvinghausen https://github.com/buvinghausen
- Bit Diffusion Limited [email protected]
- Jimmy Bogard https://github.com/jbogard
- Ross Buggins https://github.com/rbugginsvia
- Nima Boscarino https://github.com/NimaBoscarino
- Oscar Bralo https://github.com/Oscarbralo
- Alex Brown https://github.com/alexjamesbrown
- Ethan Celletti https://github.com/Gekctek
- Chris Cho https://github.com/ccho-mongodb
- Adam Avery Cole https://github.com/adamaverycole
- Nate Contino https://github.com/nathan-contino-mongo
- Alex Dawes https://github.com/alexdawes
- Justin Dearing [email protected]
- Dan DeBilt [email protected]
- Teun Duynstee [email protected]
- Einar Egilsson https://github.com/einaregilsson
- Ken Egozi [email protected]
- Alexander Endris https://github.com/AlexEndris
- Daniel Goldman [email protected]
- David Golub https://github.com/dgolub
- Simon Green [email protected]
- Bouke Haarsma https://github.com/Bouke
- James Hadwen [email protected]
- Nuri Halperin https://github.com/nurih
- Daniel Hegener [email protected]
- Nikola Irinchev https://github.com/nirinchev
- Jacob Jewell [email protected]
- Vincent Kam https://github.com/vincentkam
- Danny Kendrick https://github.com/dkendrick
- Ruslan Khasanbaev https://github.com/flaksirus
- Konstantin Khitrykh https://github.com/KonH
- Brian Knight [email protected]
- John Knoop https://github.com/johnknoop
- Andrey Kondratyev https://github.com/byTimo
- Anatoly Koperin https://github.com/ExM
- Nik Kolev [email protected]
- Oleg Kosmakov https://github.com/kosmakoff
- Maksim Krautsou https://github.com/MaKCbIMKo
- Richard Kreuter [email protected]
- Daniel Lee https://github.com/dlee148
- Ming Yau Lee https://github.com/mingyaulee
- Kevin Lewis [email protected]
- Dow Liu [email protected]
- Chuck Lu https://github.com/chucklu
- Alex Lyman [email protected]
- Tomasz Masternak https://github.com/tmasternak
- Mikalai Mazurenka [email protected]
- John Murphy https://github.com/jsmurphy
- Alexander Nagy [email protected]
- Sridhar Nanjundeswaran https://github.com/sridharn
- Nathan https://github.com/terakilobyte
- Adelin Owona https://github.com/adelinowona
- Rachelle Palmer https://github.com/techbelle
- Rich Quackenbush [email protected]
- Carl Reinke https://github.com/mindless2112
- Rodrigo Reis https://github.com/rodrigoreis
- Gian Maria Ricci https://github.com/alkampfergit
- Andrew Rondeau [email protected]
- Ed Rooth [email protected]
- Katie Sadoff https://github.com/ksadoff
- Manas Sahu https://github.com/Zangetsu112
- Sam558 https://github.com/Sam558
- Vladimir Setyaev [email protected]
- Sergey Shushlyapin https://github.com/sergeyshushlyapin
- Alexey Skalozub [email protected]
- Kevin Smith https://github.com/kevbite
- Pete Smith [email protected]
- Matteo Spreafico https://github.com/MatteoSp
- staywellandy https://github.com/staywellandy
- Vyacheslav Stroy https://github.com/kreig
- Jake Sta. Teresa https://github.com/JakeStaTeresa
- Testo [email protected]
- TimTim https://github.com/wegylexy
- Craig Wilson https://github.com/craiggwilson
- Zhmayev Yaroslav https://github.com/salaros
- Aristarkh Zagorodnikov https://github.com/onyxmaster
- Samir Boulema https://github.com/sboulema
- Dmitry Lukyanov https://github.com/DmitryLukyanov
If you have contributed and we have neglected to add you to this list please contact one of the maintainers to be added to the list (with apologies).