MongoDB.Driver 3.13.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.Driver.GridFS
GridFS Component of the Official MongoDB .NET Driver.
102
FormCMS
A headless CMS with GraphQL API and drag-and-drop page designer.
64
MongoDB.Driver.Core.Extensions.DiagnosticSources
Package Description
63
FormCMS
A headless CMS with GraphQL API and drag-and-drop page designer.
62
MongoDB.Driver.GridFS
GridFS Component of the Official MongoDB .NET Driver.
61
FormCMS
A headless CMS with GraphQL API and drag-and-drop page designer.
61
FormCMS
A headless CMS with GraphQL API and drag-and-drop page designer.
60
Aspire.Hosting.MongoDB
MongoDB support for Aspire.
59
FormCMS
A headless CMS with GraphQL API and drag-and-drop page designer.
59
FormCMS
A headless CMS with GraphQL API and drag-and-drop page designer.
58
FormCMS
A headless CMS with GraphQL API and drag-and-drop page designer.
57
FormCMS
AI powered CMS
57
MongoDB.Driver.GridFS
GridFS Component of the Official MongoDB .NET Driver.
56
FormCMS
A headless CMS with GraphQL API and drag-and-drop page designer.
56
MassTransit.MongoDb
MassTransit MongoDb persistence support; MassTransit provides a developer-focused, modern platform for creating distributed applications without complexity.
56
FormCMS
AI powered CMS
56

Version Downloads Last updated
3.13.0 14 10/22/2026
3.12.0 34 09/18/2026
3.11.2 20 09/11/2026
3.11.1 28 08/27/2026
3.11.0 27 08/13/2026
3.10.0 28 07/14/2026
3.9.0 40 05/29/2026
3.8.1 35 05/13/2026
3.8.0 53 04/23/2026
3.7.1 59 03/22/2026
3.7.0 60 03/04/2026
3.6.0 76 01/16/2026
3.5.2 8 10/01/2026
3.5.1 49 12/31/2025
3.5.0 64 12/31/2025
3.4.3 53 12/11/2025
3.4.2 5 10/08/2026
3.4.1 7 10/08/2026
3.4.0 48 12/20/2025
3.3.0 58 12/31/2025
3.2.1 51 12/20/2025
3.2.0 57 12/20/2025
3.1.0 54 12/20/2025
3.0.0 58 12/15/2025
2.30.0 44 12/31/2025
2.29.0 47 12/18/2025
2.28.0 57 12/20/2025
2.27.0 39 12/15/2025
2.26.0 52 12/16/2025
2.25.0 48 12/15/2025
2.24.0 48 12/11/2025
2.23.2 39 12/13/2025
2.23.1 42 12/12/2025
2.23.0 42 12/19/2025
2.22.0 54 12/29/2025
2.21.0 45 12/26/2025
2.20.0 97 12/31/2025
2.19.2 50 12/13/2025
2.19.1 52 12/16/2025
2.19.0 52 12/22/2025
2.18.0 45 12/16/2025
2.17.1 62 12/12/2025
2.17.0 47 12/18/2025
2.16.1 49 12/25/2025
2.16.0 8 10/01/2026
2.15.1 40 12/25/2025
2.15.0 56 12/11/2025
2.14.1 52 12/14/2025
2.14.0 53 12/13/2025
2.14.0-beta1 47 12/24/2025
2.13.3 46 12/17/2025
2.13.2 51 12/17/2025
2.13.1 48 12/14/2025
2.13.0 44 12/18/2025
2.13.0-beta1 45 12/18/2025
2.12.5 6 10/07/2026
2.12.4 7 09/28/2026
2.12.3 53 12/31/2025
2.12.2 48 12/31/2025
2.12.1 50 12/11/2025
2.12.0 48 12/28/2025
2.12.0-beta1 47 01/01/2026
2.11.6 50 12/19/2025
2.11.5 48 12/13/2025
2.11.4 54 12/15/2025
2.11.3 54 12/22/2025
2.11.2 51 12/23/2025
2.11.1 54 12/13/2025
2.11.0 55 12/31/2025
2.11.0-beta2 46 12/11/2025
2.11.0-beta1 46 12/29/2025
2.10.4 59 12/23/2025
2.10.3 58 12/15/2025
2.10.2 48 12/11/2025
2.10.1 49 12/31/2025
2.10.0 55 12/20/2025
2.10.0-beta1 45 12/19/2025
2.9.3 47 12/18/2025
2.9.2 44 12/15/2025
2.9.1 55 12/11/2025
2.9.0 54 12/20/2025
2.9.0-beta2 47 12/13/2025
2.9.0-beta1 4 10/07/2026
2.8.1 57 12/20/2025
2.8.0 43 12/11/2025
2.7.3 50 12/20/2025
2.7.2 51 12/20/2025
2.7.1 44 12/11/2025
2.7.0 55 12/18/2025
2.7.0-beta0001 47 12/20/2025
2.6.1 59 12/20/2025
2.6.0 46 12/12/2025
2.5.1 47 12/15/2025
2.5.0 49 12/15/2025
2.4.4 48 12/11/2025
2.4.3 44 12/20/2025
2.4.2 48 12/11/2025
2.4.1 43 12/20/2025
2.4.0 7 09/30/2026
2.4.0-beta1 44 12/31/2025
2.3.0 52 12/20/2025
2.3.0-rc1 55 12/18/2025
2.3.0-beta1 45 12/13/2025
2.2.4 48 12/20/2025
2.2.3 56 12/20/2025
2.2.2 48 12/24/2025
2.2.1 39 12/13/2025
2.2.0 47 12/20/2025
2.2.0-rc0 34 12/17/2025
2.1.1 43 12/20/2025
2.1.0 47 12/20/2025
2.1.0-rc1 8 10/09/2026
2.1.0-rc0 37 12/13/2025
2.0.2 53 12/20/2025
2.0.1 48 12/11/2025
2.0.0 48 12/20/2025
2.0.0-rc0 35 12/21/2025
2.0.0-beta4 41 12/29/2025
2.0.0-beta3 42 12/31/2025
2.0.0-beta2 42 12/31/2025
2.0.0-beta1 40 12/16/2025