MongoDB.Driver 3.5.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
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver
41
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver
40
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver.
40
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver
39
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver.
38
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver.
37
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver
37
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver.
36
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver
36
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver.
35
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver
35
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver.
34
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver
34

https://github.com/mongodb/mongo-csharp-driver/releases/tag/v3.5.0

Version Downloads Last updated
3.5.0 10 9/12/2025
3.4.3 9 8/18/2025
3.4.2 16 7/27/2025
3.4.1 15 7/19/2025
3.4.0 21 5/2/2025
3.3.0 27 3/28/2025
3.2.1 24 2/21/2025
3.2.0 28 2/21/2025
3.1.0 22 2/21/2025
3.0.0 23 12/5/2024
2.30.0 23 11/15/2024
2.29.0 27 9/19/2024
2.28.0 35 8/11/2024
2.27.0 31 6/30/2024
2.26.0 27 6/26/2024
2.25.0 35 5/5/2024
2.24.0 27 3/7/2024
2.23.2 28 3/7/2024
2.23.1 31 3/7/2024
2.23.0 31 3/7/2024
2.22.0 34 3/7/2024
2.21.0 36 3/7/2024
2.20.0 28 7/2/2023
2.19.2 30 3/7/2024
2.19.1 30 3/7/2024
2.19.0 35 3/7/2024
2.18.0 33 3/7/2024
2.17.1 40 3/7/2024
2.17.0 31 3/7/2024
2.16.1 36 3/7/2024
2.16.0 30 3/7/2024
2.15.1 29 3/7/2024
2.15.0 34 3/7/2024
2.14.1 29 3/7/2024
2.14.0 31 3/7/2024
2.14.0-beta1 32 3/7/2024
2.13.3 31 3/7/2024
2.13.2 29 3/7/2024
2.13.1 33 3/7/2024
2.13.0 28 3/7/2024
2.13.0-beta1 27 3/7/2024
2.12.5 36 3/7/2024
2.12.4 31 3/7/2024
2.12.3 30 3/7/2024
2.12.2 36 3/7/2024
2.12.1 27 3/7/2024
2.12.0 36 3/7/2024
2.12.0-beta1 31 3/7/2024
2.11.6 38 3/7/2024
2.11.5 30 3/7/2024
2.11.4 30 4/12/2022
2.11.3 29 3/7/2024
2.11.2 29 3/7/2024
2.11.1 28 3/7/2024
2.11.0 32 3/7/2024
2.11.0-beta2 28 3/7/2024
2.11.0-beta1 31 3/7/2024
2.10.4 27 3/7/2024
2.10.3 34 3/7/2024
2.10.2 26 3/7/2024
2.10.1 32 3/7/2024
2.10.0 29 3/7/2024
2.10.0-beta1 29 3/7/2024
2.9.3 35 3/7/2024
2.9.2 32 3/7/2024
2.9.1 30 3/7/2024
2.9.0 34 3/7/2024
2.9.0-beta2 29 3/5/2024
2.9.0-beta1 35 3/5/2024
2.8.1 28 3/7/2024
2.8.0 28 3/7/2024
2.7.3 31 3/7/2024
2.7.2 31 3/7/2024
2.7.1 38 3/7/2024
2.7.0 28 3/7/2024
2.7.0-beta0001 32 3/5/2024
2.6.1 32 3/7/2024
2.6.0 32 3/7/2024
2.5.1 32 3/7/2024
2.5.0 29 3/7/2024
2.4.4 31 3/7/2024
2.4.3 38 3/7/2024
2.4.2 29 3/7/2024
2.4.1 33 3/7/2024
2.4.0 34 3/7/2024
2.4.0-beta1 27 3/5/2024
2.3.0 36 3/7/2024
2.3.0-rc1 28 3/7/2024
2.3.0-beta1 31 3/5/2024
2.2.4 33 3/7/2024
2.2.3 28 3/7/2024
2.2.2 34 3/7/2024
2.2.1 27 3/7/2024
2.2.0 27 3/7/2024
2.2.0-rc0 35 3/7/2024
2.1.1 32 3/7/2024
2.1.0 36 3/7/2024
2.1.0-rc1 30 3/7/2024
2.1.0-rc0 34 3/7/2024
2.0.2 34 3/7/2024
2.0.1 30 3/7/2024
2.0.0 36 3/7/2024
2.0.0-rc0 31 3/7/2024
2.0.0-beta4 35 3/5/2024
2.0.0-beta3 33 3/5/2024
2.0.0-beta2 34 3/5/2024
2.0.0-beta1 29 3/5/2024