mongocsharpdriver 2.30.0
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.
No packages depend on mongocsharpdriver.
https://github.com/mongodb/mongo-csharp-driver/releases/tag/v2.30.0
.NET Framework 4.7.2
- MongoDB.Bson (>= 2.30.0)
- MongoDB.Driver.Core (>= 2.30.0)
- MongoDB.Driver (>= 2.30.0)
.NET Standard 2.0
- MongoDB.Bson (>= 2.30.0)
- MongoDB.Driver.Core (>= 2.30.0)
- MongoDB.Driver (>= 2.30.0)
.NET Standard 2.1
- MongoDB.Bson (>= 2.30.0)
- MongoDB.Driver.Core (>= 2.30.0)
- MongoDB.Driver (>= 2.30.0)
Version | Downloads | Last updated |
---|---|---|
2.30.0 | 8 | 10/17/2024 |
2.29.0 | 8 | 09/23/2024 |
2.28.0 | 9 | 07/27/2024 |
2.27.0 | 13 | 06/28/2024 |
2.26.0 | 13 | 06/26/2024 |
2.25.0 | 12 | 04/25/2024 |
2.24.0 | 18 | 03/03/2024 |
2.23.2 | 17 | 03/03/2024 |
2.23.1 | 15 | 12/30/2023 |
2.23.0 | 15 | 12/30/2023 |
2.22.0 | 22 | 11/28/2023 |
2.21.0 | 19 | 10/24/2023 |
2.20.0 | 20 | 10/04/2023 |
2.19.2 | 22 | 06/04/2023 |
2.19.1 | 20 | 06/05/2023 |
2.19.0 | 21 | 06/05/2023 |
2.18.0 | 19 | 06/05/2023 |
2.17.1 | 18 | 06/05/2023 |
2.17.0 | 24 | 06/05/2023 |
2.16.1 | 23 | 06/05/2023 |
2.16.0 | 20 | 06/05/2023 |
2.15.1 | 20 | 06/05/2023 |
2.15.0 | 23 | 06/05/2023 |
2.14.1 | 18 | 06/05/2023 |
2.14.0 | 23 | 06/05/2023 |
2.14.0-beta1 | 21 | 06/05/2023 |
2.13.3 | 20 | 06/05/2023 |
2.13.2 | 22 | 11/12/2021 |
2.13.1 | 21 | 06/05/2023 |
2.13.0 | 18 | 06/05/2023 |
2.13.0-beta1 | 20 | 06/05/2023 |
2.12.5 | 21 | 06/05/2023 |
2.12.4 | 19 | 06/05/2023 |
2.12.3 | 633 | 05/24/2021 |
2.12.2 | 24 | 06/05/2023 |
2.12.1 | 22 | 06/05/2023 |
2.12.0 | 126 | 03/19/2021 |
2.12.0-beta1 | 18 | 06/05/2023 |
2.11.6 | 92 | 03/01/2021 |
2.11.5 | 211 | 12/16/2020 |
2.11.4 | 20 | 06/05/2023 |
2.11.3 | 17 | 06/05/2023 |
2.11.2 | 23 | 06/05/2023 |
2.11.1 | 24 | 06/05/2023 |
2.11.0 | 18 | 06/05/2023 |
2.11.0-beta2 | 16 | 06/05/2023 |
2.11.0-beta1 | 22 | 06/05/2023 |
2.10.4 | 18 | 06/05/2023 |
2.10.3 | 28 | 06/05/2023 |
2.10.2 | 23 | 06/05/2023 |
2.10.1 | 20 | 06/05/2023 |
2.10.0 | 25 | 06/05/2023 |
2.10.0-beta1 | 20 | 06/05/2023 |
2.9.3 | 23 | 06/05/2023 |
2.9.2 | 23 | 06/05/2023 |
2.9.1 | 19 | 06/05/2023 |
2.9.0 | 23 | 06/05/2023 |
2.9.0-beta2 | 23 | 06/05/2023 |
2.9.0-beta1 | 23 | 06/05/2023 |
2.8.1 | 25 | 06/05/2023 |
2.8.0 | 21 | 06/05/2023 |
2.7.3 | 19 | 06/05/2023 |
2.7.2 | 19 | 06/05/2023 |
2.7.1 | 21 | 06/05/2023 |
2.7.0 | 21 | 06/05/2023 |
2.7.0-beta0001 | 18 | 06/05/2023 |
2.6.1 | 21 | 06/05/2023 |
2.6.0 | 25 | 06/05/2023 |
2.5.1 | 24 | 06/05/2023 |
2.5.0 | 20 | 06/05/2023 |
2.4.4 | 20 | 06/05/2023 |
2.4.3 | 25 | 06/05/2023 |
2.4.2 | 24 | 06/05/2023 |
2.4.1 | 21 | 06/05/2023 |
2.4.0 | 23 | 06/05/2023 |
2.4.0-beta1 | 22 | 06/05/2023 |
2.3.0 | 21 | 06/05/2023 |
2.3.0-rc1 | 20 | 06/05/2023 |
2.3.0-beta1 | 16 | 06/05/2023 |
2.2.4 | 23 | 06/05/2023 |
2.2.3 | 23 | 06/05/2023 |
2.2.2 | 19 | 06/05/2023 |
2.2.1 | 23 | 06/05/2023 |
2.2.0 | 24 | 06/05/2023 |
2.2.0-rc0 | 19 | 06/05/2023 |
2.1.1 | 22 | 06/05/2023 |
2.1.0 | 22 | 06/05/2023 |
2.1.0-rc1 | 18 | 06/05/2023 |
2.1.0-rc0 | 21 | 06/05/2023 |
2.0.2 | 19 | 06/05/2023 |
2.0.1 | 21 | 06/05/2023 |
2.0.0 | 23 | 06/05/2023 |
2.0.0-rc0 | 19 | 06/05/2023 |
2.0.0-beta4 | 18 | 06/05/2023 |
2.0.0-beta3 | 18 | 06/05/2023 |
2.0.0-beta2 | 21 | 06/05/2023 |
2.0.0-beta1 | 20 | 06/05/2023 |
1.11.0 | 20 | 06/05/2023 |
1.11.0-rc0 | 18 | 06/05/2023 |
1.10.1 | 18 | 06/05/2023 |
1.10.0 | 16 | 06/05/2023 |
1.10.0-rc1 | 23 | 06/05/2023 |
1.10.0-rc0 | 17 | 06/05/2023 |
1.9.2 | 17 | 06/05/2023 |
1.9.1 | 22 | 06/05/2023 |
1.9.0 | 23 | 06/05/2023 |
1.8.3 | 22 | 06/05/2023 |
1.8.2 | 23 | 06/05/2023 |
1.8.1 | 21 | 06/05/2023 |
1.8.0 | 22 | 06/05/2023 |
1.7.1 | 21 | 06/05/2023 |
1.7.0 | 27 | 06/05/2023 |
1.6.1 | 22 | 06/05/2023 |
1.6.0 | 21 | 06/05/2023 |
1.5.0 | 22 | 06/05/2023 |
1.4.2 | 24 | 06/05/2023 |
1.4.1 | 19 | 06/05/2023 |
1.4.0 | 22 | 06/05/2023 |
1.3.1 | 20 | 06/05/2023 |
1.3.0 | 21 | 06/05/2023 |
1.2.0 | 21 | 06/05/2023 |
1.1.0 | 20 | 06/05/2023 |
1.0.0 | 20 | 06/05/2023 |
0.11.0.4042 | 18 | 06/05/2023 |