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]
- Dmitry Lukyanov [email protected]
- James Kovacs [email protected]
- Mikalai Mazurenka [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
- 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]
- Simon Green [email protected]
- Bouke Haarsma https://github.com/Bouke
- James Hadwen [email protected]
- Nuri Halperin https://github.com/nurih
- Nikola Irinchev https://github.com/nirinchev
- Jacob Jewell [email protected]
- 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
- Kevin Lewis [email protected]
- Dow Liu [email protected]
- Chuck Lu https://github.com/chucklu
- Alex Lyman [email protected]
- Tomasz Masternak https://github.com/tmasternak
- John Murphy https://github.com/jsmurphy
- Alexander Nagy [email protected]
- Sridhar Nanjundeswaran https://github.com/sridharn
- Nathan https://github.com/terakilobyte
- 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
- Sam558 https://github.com/Sam558
- Sergey Shushlyapin https://github.com/sergeyshushlyapin
- Alexey Skalozub [email protected]
- Kevin Smith https://github.com/kevbite
- Pete Smith [email protected]
- 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
- Zhmayev Yaroslav https://github.com/salaros
- Aristarkh Zagorodnikov https://github.com/onyxmaster
- Vincent Kam https://github.com/vincentkam
- Craig Wilson https://github.com/craiggwilson
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).