MongoDB.Bson 3.4.2

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

Packages Downloads
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver.
26
MongoDB.Driver
Official .NET driver for MongoDB.
20
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver.
13
MongoDB.Driver
Official .NET driver for MongoDB.
10
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver.
10
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver
10
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver
9

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

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