MongoDB.Driver 2.29.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.

Packages Downloads
MongoDB.Driver.GridFS
GridFS Component of the Official MongoDB .NET Driver.
496
MongoDB.Driver.GridFS
GridFS Component of the Official MongoDB .NET Driver.
194
Flowaccount.Data
Application Core
106
Flowaccount.Data
Application Core
73
Flowaccount.Data
Application Core
72
Flowaccount.Data
Application Core
64
Flowaccount.Data
Application Core
61
Flowaccount.Data
Application Core
60
Audit.NET.MongoDB
Store Audit.NET Trail Logs into a MongoDB database
53
Flowaccount.Data
Application Core
53
Flowaccount.Data
Application Core
52
Flowaccount.Data
Application Core
51
Flowaccount.Data
Application Core
49
Flowaccount.Data
Application Core
48
Flowaccount.Data
Application Core
46
MongoDB.Driver.GridFS
GridFS Component of the Official MongoDB .NET Driver.
46
Flowaccount.Data
Application Core
45
Flowaccount.Data
Application Core
44
Flowaccount.Data
Application Core
43

https://github.com/mongodb/mongo-csharp-driver/releases/tag/v2.29.0

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