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