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.
28
MongoDB.Driver
Official .NET driver for MongoDB.
26
MongoDB.Driver
Official .NET driver for MongoDB.
24
MongoDB.Driver
Official .NET driver for MongoDB.
23
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

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