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).