You can get the latest stable release from the official Nuget.org feed or from our github releases page.
If you'd like to work with the bleeding edge, you can use our custom feed. Some packages on this feed are pre-release and, while they've passed all our tests, are not yet ready for production.
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.
- Robert Stam [email protected]
- Craig Wilson [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]
- Nima Boscarino https://github.com/NimaBoscarino
- Oscar Bralo https://github.com/Oscarbralo
- Alex Brown https://github.com/alexjamesbrown
- Adam Avery Cole https://github.com/adamaverycole
- 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]
- Daniel Goldman [email protected]
- Simon Green [email protected]
- James Hadwen [email protected]
- Jacob Jewell [email protected]
- Danny Kendrick https://github.com/dkendrick
- Brian Knight [email protected]
- 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]
- John Murphy https://github.com/jsmurphy
- Alexander Nagy [email protected]
- Sridhar Nanjundeswaran https://github.com/sridharn
- Rich Quackenbush [email protected]
- Carl Reinke https://github.com/mindless2112
- Gian Maria Ricci https://github.com/alkampfergit
- Andrew Rondeau [email protected]
- Ed Rooth [email protected]
- Sam558 https://github.com/Sam558
- Sergey Shushlyapin https://github.com/sergeyshushlyapin
- Alexey Skalozub [email protected]
- Pete Smith [email protected]
- staywellandy https://github.com/staywellandy
- Vyacheslav Stroy https://github.com/kreig
- Testo [email protected]
- Zhmayev Yaroslav https://github.com/salaros
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).