MongoDB.Driver 3.14.0

MongoDB C# Driver

MongoDB.Driver Documentation Documentation License

The official MongoDB .NET/C# driver.

The MongoDB .NET/C# driver follows semantic versioning since v3.0.0 of its releases.

Getting Started

Untyped Documents

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"]);
}

Typed Documents

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);
}

Documentation

Questions/Bug Reports

If you’ve identified a security vulnerability in a driver or any other MongoDB project, please report it according to the instructions here.

Contributing

Please see our guidelines for contributing to the driver.

Thank you to everyone who has contributed to this project.

Showing the top 20 packages that depend on MongoDB.Driver.

Packages Downloads
MongoDB.EntityFrameworkCore
Official MongoDB supported provider for Entity Framework Core 8. See https://www.mongodb.com/docs/entity-framework/ for more details.
16
MongoDB.EntityFrameworkCore
Official MongoDB supported provider for Entity Framework Core. See https://www.mongodb.com/docs/entity-framework/ for more details.
16
DistributedLock
Provides easy-to-use mutexes, reader-writer locks, and semaphores that can synchronize across processes and machines. This is an umbrella package that brings in the entire family of DistributedLock.* packages (e. g. DistributedLock.SqlServer) as references. Those packages can also be installed individually.
16
DistributedLock
Provides easy-to-use mutexes, reader-writer locks, and semaphores that can synchronize across processes and machines. This is an umbrella package that brings in the entire family of DistributedLock.* packages (e. g. DistributedLock.SqlServer) as references. Those packages can also be installed individually.
15
MongoDB.Driver.Extensions
Package Description
15
MongoDB.EntityFrameworkCore
Official MongoDB supported provider for Entity Framework Core. See https://www.mongodb.com/docs/entity-framework/ for more details.
15
MongoDB.Driver.Extensions
MongoDB.Driver.Extensions is a library that helps you to stay in love with MongoDb.
14
DistributedLock.MongoDB
Provides a distributed lock implementation based on MongoDB
14
MongoDB.EntityFrameworkCore
Official MongoDB supported provider for Entity Framework Core. See https://www.mongodb.com/docs/entity-framework/ for more details.
14
MongoDB.EntityFrameworkCore
Official MongoDB supported provider for Entity Framework Core 8. See https://www.mongodb.com/docs/entity-framework/ for more details.
14
MongoDB.Driver.Extensions
Package Description
13
MongoDB.EntityFrameworkCore
Official MongoDB supported provider for Entity Framework Core 8. See https://www.mongodb.com/docs/entity-framework/ for more details.
13
MongoDB.EntityFrameworkCore
Official MongoDB supported provider for Entity Framework Core. See https://www.mongodb.com/docs/entity-framework/ for more details.
13
DistributedLock
Provides easy-to-use mutexes, reader-writer locks, and semaphores that can synchronize across processes and machines. This is an umbrella package that brings in the entire family of DistributedLock.* packages (e. g. DistributedLock.SqlServer) as references. Those packages can also be installed individually.
13
DistributedLock.MongoDB
Provides a distributed lock implementation based on MongoDB
13
MongoDB.Driver.Extensions
Package Description
12
MongoDB.EntityFrameworkCore
Official MongoDB supported provider for Entity Framework Core. See https://www.mongodb.com/docs/entity-framework/ for more details.
12

Version Downloads Last updated
3.14.0 2 11/16/2026
3.13.0 11 10/24/2026
3.12.0 13 09/19/2026
3.11.2 14 09/13/2026
3.11.1 14 08/28/2026
3.11.0 14 08/12/2026
3.10.0 16 07/10/2026
3.9.0 16 06/26/2026
3.8.1 29 06/26/2026
3.8.0 16 06/26/2026
3.7.1 22 04/09/2026
3.7.0 17 06/26/2026
3.6.0 24 06/26/2026
3.5.2 16 06/26/2026
3.5.1 16 06/26/2026
3.5.0 25 06/26/2026
3.4.3 13 06/26/2026
3.4.2 18 06/26/2026
3.4.1 16 06/26/2026
3.4.0 18 06/26/2026
3.3.0 19 06/26/2026
3.2.1 13 06/26/2026
3.2.0 12 06/26/2026
3.1.0 18 06/26/2026
3.0.0 21 06/26/2026
2.30.0 14 07/05/2026
2.29.0 19 07/04/2026
2.28.0 14 08/08/2026
2.27.0 16 07/02/2026
2.26.0 13 10/08/2024
2.25.0 19 07/07/2026
2.24.0 15 07/06/2026
2.23.2 14 06/30/2026
2.23.1 14 07/16/2026
2.23.0 16 07/01/2026
2.22.0 16 06/29/2026
2.21.0 14 06/29/2026
2.20.0 16 07/07/2026
2.19.2 12 07/03/2026
2.19.1 14 11/11/2024
2.19.0 15 06/25/2026
2.18.0 16 06/25/2026
2.17.1 15 06/29/2026
2.17.0 12 06/25/2026
2.16.1 13 06/29/2026
2.16.0 8 06/25/2026
2.15.1 15 07/16/2026
2.15.0 11 06/25/2026
2.14.1 15 06/30/2026
2.14.0 12 06/25/2026
2.14.0-beta1 13 06/30/2026
2.13.3 27 07/07/2026
2.13.2 15 07/01/2026
2.13.1 12 07/16/2026
2.13.0 12 06/26/2026
2.13.0-beta1 17 06/29/2026
2.12.5 19 06/29/2026
2.12.4 11 06/29/2026
2.12.3 13 07/08/2026
2.12.2 11 07/16/2026
2.12.1 11 07/16/2026
2.12.0 11 06/29/2026
2.12.0-beta1 14 06/30/2026
2.11.6 10 07/05/2026
2.11.5 20 07/16/2026
2.11.4 16 06/30/2026
2.11.3 16 07/07/2026
2.11.2 13 07/03/2026
2.11.1 11 06/29/2026
2.11.0 13 07/12/2026
2.11.0-beta2 16 06/30/2026
2.11.0-beta1 12 06/30/2026
2.10.4 6 06/25/2026
2.10.3 13 06/26/2026
2.10.2 17 07/01/2026
2.10.1 12 06/30/2026
2.10.0 22 06/29/2026
2.10.0-beta1 13 07/01/2026
2.9.3 17 06/26/2026
2.9.2 19 06/26/2026
2.9.1 14 06/26/2026
2.9.0 20 06/26/2026
2.9.0-beta2 11 06/25/2026
2.9.0-beta1 13 07/19/2026
2.8.1 16 06/26/2026
2.8.0 20 06/26/2026
2.7.3 11 06/26/2026
2.7.2 11 06/25/2026
2.7.1 14 06/26/2026
2.7.0 14 06/26/2026
2.7.0-beta0001 18 06/25/2026
2.6.1 19 06/26/2026
2.6.0 16 06/26/2026
2.5.1 10 06/26/2026
2.5.0 24 06/26/2026
2.4.4 20 06/26/2026
2.4.3 14 06/26/2026
2.4.2 16 06/26/2026
2.4.1 16 06/26/2026
2.4.0 11 06/26/2026
2.4.0-beta1 10 07/02/2026
2.3.0 10 06/26/2026
2.3.0-rc1 11 06/30/2026
2.3.0-beta1 15 06/29/2026
2.2.4 8 06/26/2026
2.2.3 18 06/26/2026
2.2.2 14 07/07/2026
2.2.1 17 06/26/2026
2.2.0 19 06/26/2026
2.2.0-rc0 18 06/29/2026
2.1.1 14 06/26/2026
2.1.0 26 06/26/2026
2.1.0-rc1 12 06/27/2026
2.1.0-rc0 17 06/27/2026
2.0.2 16 06/26/2026
2.0.1 13 06/26/2026
2.0.0 10 06/26/2026
2.0.0-rc0 15 06/30/2026
2.0.0-beta4 14 06/25/2026
2.0.0-beta3 10 06/25/2026
2.0.0-beta2 10 06/30/2026
2.0.0-beta1 14 06/25/2026