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 boris.dogadov@mongodb.com
- James Kovacs james.kovacs@mongodb.com
- Oleksandr Poliakov oleksandr.poliakov@mongodb.com
- Robert Stam robert@mongodb.com
- 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 code@bitdiff.com
- 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 zippy1981@gmail.com
- Dan DeBilt dan.debilt@gmail.com
- Teun Duynstee teun@duynstee.com
- Einar Egilsson https://github.com/einaregilsson
- Ken Egozi mail@kenegozi.com
- Alexander Endris https://github.com/AlexEndris
- Daniel Goldman daniel@stackwave.com
- David Golub https://github.com/dgolub
- Simon Green simon@captaincodeman.com
- Bouke Haarsma https://github.com/Bouke
- James Hadwen james.hadwen@sociustec.com
- Nuri Halperin https://github.com/nurih
- Daniel Hegener daniel.hegener@fisglobal.com
- Nikola Irinchev https://github.com/nirinchev
- Jacob Jewell jacobjewell@eflexsystems.com
- 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 brianknight10@gmail.com
- John Knoop https://github.com/johnknoop
- Andrey Kondratyev https://github.com/byTimo
- Anatoly Koperin https://github.com/ExM
- Nik Kolev nkolev@gmail.com
- Oleg Kosmakov https://github.com/kosmakoff
- Maksim Krautsou https://github.com/MaKCbIMKo
- Richard Kreuter richard@10gen.com
- Daniel Lee https://github.com/dlee148
- Ming Yau Lee https://github.com/mingyaulee
- Kevin Lewis kevin.l.lewis@gmail.com
- Dow Liu redforks@gmail.com
- Chuck Lu https://github.com/chucklu
- Alex Lyman mail.alex.lyman@gmail.com
- Tomasz Masternak https://github.com/tmasternak
- Mikalai Mazurenka mikalai.mazurenka@mongodb.com
- John Murphy https://github.com/jsmurphy
- Alexander Nagy optimiz3@gmail.com
- 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 rich.quackenbush@captiveaire.com
- Carl Reinke https://github.com/mindless2112
- Rodrigo Reis https://github.com/rodrigoreis
- Gian Maria Ricci https://github.com/alkampfergit
- Andrew Rondeau github@andrewrondeau.com
- Ed Rooth edward.rooth@wallstreetjapan.com
- Katie Sadoff https://github.com/ksadoff
- Manas Sahu https://github.com/Zangetsu112
- Sam558 https://github.com/Sam558
- Vladimir Setyaev setyaev_v@pgstudio.io
- Sergey Shushlyapin https://github.com/sergeyshushlyapin
- Alexey Skalozub pieceofsummer@gmail.com
- Kevin Smith https://github.com/kevbite
- Pete Smith roysvork@gmail.com
- 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 test1@doramail.com
- 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
- Andrea Balducci https://github.com/andreabalducci
- Sergei Lipin https://github.com/prchaoz
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).