MongoDB.Bson 3.10.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.Bson.

Packages Downloads
MongoDB.Driver
Official .NET driver for MongoDB.
56
MongoDB.Driver
Official .NET driver for MongoDB.
52
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
50
MongoDB.Driver
Official .NET driver for MongoDB.
47
MongoDB.Driver
Official .NET driver for MongoDB.
46
MongoDB.Driver
Official .NET driver for MongoDB.
44
MongoDB.Driver
Official .NET driver for MongoDB.
43
MongoDB.Driver.GridFS
GridFS Component of the Official MongoDB .NET Driver.
42
MongoDB.Driver
Official .NET driver for MongoDB.
42
MongoDB.Driver
Official .NET driver for MongoDB.
41
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
39
MongoDB.Driver
Official .NET driver for MongoDB.
39
MongoDB.Driver.GridFS
GridFS Component of the Official MongoDB .NET Driver.
38
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
38
MongoDB.Driver
Official .NET driver for MongoDB.
37

Version Downloads Last updated
3.10.0 10 07/09/2026
3.9.0 17 05/29/2026
3.8.1 17 05/13/2026
3.8.0 38 04/23/2026
3.7.1 37 03/20/2026
3.7.0 34 03/04/2026
3.6.0 40 01/17/2026
3.5.2 34 12/11/2025
3.5.1 31 12/16/2025
3.5.0 32 12/20/2025
3.4.3 37 12/17/2025
3.4.2 38 12/18/2025
3.4.1 29 01/01/2026
3.4.0 28 12/12/2025
3.3.0 38 12/15/2025
3.2.1 32 12/11/2025
3.2.0 36 01/01/2026
3.1.0 37 12/13/2025
3.0.0 34 12/16/2025
2.30.0 33 12/25/2025
2.29.0 34 12/15/2025
2.28.0 23 12/12/2025
2.27.0 29 12/13/2025
2.26.0 29 12/12/2025
2.25.0 32 01/01/2026
2.24.0 27 12/16/2025
2.23.2 24 12/13/2025
2.23.1 26 01/01/2026
2.23.0 29 12/13/2025
2.22.0 27 12/16/2025
2.21.0 31 12/12/2025
2.20.0 18 12/13/2025
2.19.2 28 12/11/2025
2.19.1 30 12/15/2025
2.19.0 26 12/11/2025
2.18.0 21 01/01/2026
2.17.1 30 12/13/2025
2.17.0 30 12/14/2025
2.16.1 28 12/13/2025
2.16.0 26 12/13/2025
2.15.1 37 12/15/2025
2.15.0 29 12/12/2025
2.14.1 28 01/01/2026
2.14.0 23 12/13/2025
2.14.0-beta1 23 12/23/2025
2.13.3 32 12/12/2025
2.13.2 26 12/29/2025
2.13.1 32 12/28/2025
2.13.0 34 12/13/2025
2.13.0-beta1 26 01/01/2026
2.12.5 27 01/01/2026
2.12.4 31 12/24/2025
2.12.3 30 12/13/2025
2.12.2 28 01/01/2026
2.12.1 27 12/13/2025
2.12.0 36 12/13/2025
2.12.0-beta1 33 12/13/2025
2.11.6 31 12/12/2025
2.11.5 25 12/13/2025
2.11.4 28 12/15/2025
2.11.3 31 12/13/2025
2.11.2 28 01/01/2026
2.11.1 30 01/01/2026
2.11.0 26 12/13/2025
2.11.0-beta2 31 12/11/2025
2.11.0-beta1 24 12/18/2025
2.10.4 26 12/15/2025
2.10.3 28 12/20/2025
2.10.2 24 12/13/2025
2.10.1 26 12/27/2025
2.10.0 27 01/02/2026
2.10.0-beta1 27 12/11/2025
2.9.3 41 12/11/2025
2.9.2 33 12/13/2025
2.9.1 32 12/13/2025
2.9.0 25 12/12/2025
2.9.0-beta2 27 12/12/2025
2.9.0-beta1 33 12/13/2025
2.8.1 25 01/01/2026
2.8.0 33 12/22/2025
2.7.3 29 12/13/2025
2.7.2 26 12/13/2025
2.7.1 24 12/30/2025
2.7.0 30 12/24/2025
2.7.0-beta0001 21 12/28/2025
2.6.1 31 12/13/2025
2.6.0 30 01/01/2026
2.5.1 26 12/15/2025
2.5.0 38 12/13/2025
2.4.4 24 01/01/2026
2.4.3 28 01/01/2026
2.4.2 28 01/01/2026
2.4.1 27 12/13/2025
2.4.0 25 12/23/2025
2.4.0-beta1 27 12/14/2025
2.3.0 29 12/13/2025
2.3.0-rc1 30 12/13/2025
2.3.0-beta1 36 12/20/2025
2.2.4 28 12/13/2025
2.2.3 26 12/15/2025
2.2.2 24 12/13/2025
2.2.1 35 12/13/2025
2.2.0 26 12/13/2025
2.2.0-rc0 30 12/12/2025
2.1.1 28 12/13/2025
2.1.0 27 12/11/2025
2.1.0-rc1 31 12/13/2025
2.1.0-rc0 26 12/13/2025
2.0.2 19 01/01/2026
2.0.1 29 12/13/2025
2.0.0 30 12/18/2025
2.0.0-rc0 32 12/13/2025
2.0.0-beta4 29 12/16/2025
2.0.0-beta3 29 12/12/2025
2.0.0-beta2 28 12/24/2025
2.0.0-beta1 27 01/01/2026