MongoDB.Driver.Core 2.30.0

MongoDB C# Driver

You can get the latest stable release from the official Nuget.org feed or from our github releases page.

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

Packages Downloads
MongoDB.Driver
Official .NET driver for MongoDB.
27
MongoDB.Driver
Official .NET driver for MongoDB.
26
MongoDB.Driver
Official .NET driver for MongoDB.
24
MongoDB.Driver
Official .NET driver for MongoDB.
22
MongoDB.Driver
Official .NET driver for MongoDB.
21
MongoDB.Driver
Official .NET driver for MongoDB.
20
MongoDB.Driver
Official .NET driver for MongoDB.
19
MongoDB.Driver
Official .NET driver for MongoDB.
18
MongoDB.Driver
Official .NET driver for MongoDB.
17

Version Downloads Last updated
2.30.0 20 07/03/2026
2.29.0 16 07/02/2026
2.28.0 15 06/29/2026
2.27.0 8 07/01/2026
2.26.0 11 06/29/2026
2.25.0 19 06/29/2026
2.24.0 12 07/03/2026
2.23.2 15 07/02/2026
2.23.1 17 07/01/2026
2.23.0 12 06/30/2026
2.22.0 12 07/02/2026
2.21.0 14 07/02/2026
2.20.0 9 07/15/2026
2.19.2 18 07/10/2024
2.19.1 11 11/11/2024
2.19.0 13 07/01/2026
2.18.0 12 07/01/2026
2.17.1 22 06/30/2026
2.17.0 9 07/02/2026
2.16.1 21 07/02/2026
2.16.0 12 06/29/2026
2.15.1 10 06/30/2026
2.15.0 15 06/30/2026
2.14.1 13 07/07/2026
2.14.0 17 07/01/2026
2.14.0-beta1 22 06/29/2026
2.13.3 14 07/15/2026
2.13.2 15 07/15/2026
2.13.1 10 07/01/2026
2.13.0 19 06/29/2026
2.13.0-beta1 16 07/06/2026
2.12.5 13 07/01/2026
2.12.4 15 07/04/2026
2.12.3 17 06/29/2026
2.12.2 13 07/04/2026
2.12.1 8 06/29/2026
2.12.0 26 07/01/2026
2.12.0-beta1 13 06/29/2026
2.11.6 14 06/29/2026
2.11.5 14 06/29/2026
2.11.4 21 07/15/2026
2.11.3 26 07/01/2026
2.11.2 15 07/05/2026
2.11.1 14 06/30/2026
2.11.0 16 07/01/2026
2.11.0-beta2 12 06/29/2026
2.11.0-beta1 11 07/18/2026
2.10.4 14 06/30/2026
2.10.3 16 07/02/2026
2.10.2 12 07/09/2026
2.10.1 15 07/05/2026
2.10.0 9 06/29/2026
2.10.0-beta1 12 06/29/2026
2.9.3 11 07/01/2026
2.9.2 16 07/01/2026
2.9.1 15 06/29/2026
2.9.0 9 06/29/2026
2.9.0-beta2 16 06/29/2026
2.9.0-beta1 15 07/01/2026
2.8.1 11 06/29/2026
2.8.0 9 07/19/2026
2.7.3 12 07/03/2026
2.7.2 16 06/30/2026
2.7.1 9 06/30/2026
2.7.0 13 06/30/2026
2.7.0-beta0001 12 07/17/2026
2.6.1 11 06/29/2026
2.6.0 11 06/29/2026
2.5.1 13 07/02/2026
2.5.0 12 06/29/2026
2.4.4 8 07/05/2026
2.4.3 15 07/01/2026
2.4.2 15 07/01/2026
2.4.1 17 07/01/2026
2.4.0 15 06/29/2026
2.4.0-beta1 18 06/29/2026
2.3.0 13 06/30/2026
2.3.0-rc1 13 06/30/2026
2.3.0-beta1 14 07/02/2026
2.2.4 21 06/29/2026
2.2.3 10 07/02/2026
2.2.2 13 07/02/2026
2.2.1 14 07/04/2026
2.2.0 10 06/29/2026
2.2.0-rc0 16 06/29/2026
2.1.1 24 06/29/2026
2.1.0 12 07/01/2026
2.1.0-rc1 18 06/29/2026
2.1.0-rc0 22 06/29/2026
2.0.2 13 06/30/2026
2.0.1 13 06/29/2026
2.0.0 10 07/02/2026
2.0.0-rc0 15 06/29/2026
2.0.0-beta4 7 06/30/2026
2.0.0-beta3 14 06/30/2026
2.0.0-beta2 15 07/10/2026
2.0.0-beta1 12 06/29/2026