MongoDB.Bson 3.5.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.
134
MongoDB.Driver
Official .NET driver for MongoDB.
91
MongoDB.Driver
Official .NET driver for MongoDB.
77
MongoDB.Driver.GridFS
GridFS Component of the Official MongoDB .NET Driver.
76
MongoDB.Driver
Official .NET driver for MongoDB.
67
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
48
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
47
MongoDB.Driver
Official .NET driver for MongoDB.
44
MongoDB.Driver
Official .NET driver for MongoDB.
43
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
38
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
37
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
35
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
32
MongoDB.Driver
Official .NET driver for MongoDB.
30
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver
28
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver
27
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver.
27
ExtentReports
Extent Reporting Framework (.Net Standard), Community Edition
26
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver.
26

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

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