MongoDB.Bson 3.4.1

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
34
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.
33
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.
38
MongoDB.Driver
Official .NET driver for MongoDB.
33
MongoDB.Driver
Official .NET driver for MongoDB.
34
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
33
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
34
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
35
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
39

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

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