![]() |
VOOZH | about |
dotnet add package MongoDB.Bson --version 3.9.0
NuGet\Install-Package MongoDB.Bson -Version 3.9.0
<PackageReference Include="MongoDB.Bson" Version="3.9.0" />
<PackageVersion Include="MongoDB.Bson" Version="3.9.0" />Directory.Packages.props
<PackageReference Include="MongoDB.Bson" />Project file
paket add MongoDB.Bson --version 3.9.0
#r "nuget: MongoDB.Bson, 3.9.0"
#:package MongoDB.Bson@3.9.0
#addin nuget:?package=MongoDB.Bson&version=3.9.0Install as a Cake Addin
#tool nuget:?package=MongoDB.Bson&version=3.9.0Install as a Cake Tool
👁 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.
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"]);
}
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);
}
If you’ve identified a security vulnerability in a driver or any other MongoDB project, please report it according to the instructions here.
Please see our for contributing to the driver.
Thank you to everyone who has contributed to this project.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 netstandard2.1 is compatible. |
| .NET Framework | net472 net472 is compatible. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on MongoDB.Bson:
| Package | Downloads |
|---|---|
|
MongoDB.Driver
Official .NET driver for MongoDB. |
|
|
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver. |
|
|
MongoDB.Driver.GridFS
GridFS Component of the Official MongoDB .NET Driver. |
|
|
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver |
|
|
Realm
Realm is a mobile database: a replacement for SQLite |
Showing the top 20 popular GitHub repositories that depend on MongoDB.Bson:
| Repository | Stars |
|---|---|
|
ServiceStack/ServiceStack
Thoughtfully architected, obscenely fast, thoroughly enjoyable web services for all
|
|
|
anjoy8/Blog.Core
💖 ASP.NET Core 8.0 全家桶教程,前后端分离后端接口,vue教程姊妹篇,官方文档:
|
|
|
openiddict/openiddict-core
Flexible and versatile OAuth 2.0/OpenID Connect stack for .NET
|
|
|
microsurging/surging
Surging is a micro-service engine that provides a lightweight, high-performance, modular RPC request pipeline. support Event-based Asynchronous Pattern and reactive programming.
|
|
|
FastReports/FastReport
Free Open Source Reporting tool for .NET6/.NET Core/.NET Framework that helps your application generate document-like reports
|
|
|
grandnode/grandnode
Open source, headless, multi-tenant eCommerce platform built with .NET Core, MongoDB, AWS DocumentDB, Azure CosmosDB, Vue.js.
|
|
|
dotnetcore/AgileConfig
基于.NET Core开发的轻量级分布式配置中心 / .NET Core lightweight configuration server
|
|
|
SteveDunn/Vogen
A semi-opinionated library which is a source generator and a code analyser. It Source generates Value Objects
|
|
|
realm/realm-dotnet
Realm is a mobile database: a replacement for SQLite & ORMs
|
|
|
qq362946/Fantasy
C # Game Framework, but not limited to games. Can be used for non game business development
|
|
|
Meowv/Blog
🤣本项目有不同开发版本,最新版底层基于 abp vNext 搭建和免费开源跨平台框架 .NET5 进行开发,使用 MongoDB 存储数据,Redis 缓存数据。项目采用前后端分离的模式进行开发,API 遵循 RESTful 接口规范,页面使用 Blazor 进行开发,可作为 .NET Core 入门项目进行学习。If you liked `Blog` project or if it helped you, please give a star ⭐️ for this repository. 👍👍👍
|
|
|
grandnode/grandnode2
E-commerce platform built with ASP.NET Core using MongoDB for NoSQL storage
|
|
|
wqaetly/NKGMobaBasedOnET
基于ET框架致敬LOL的Moba游戏,提供完整的状态帧同步框架,包含预测回滚逻辑,基于双端行为树的技能系统,更多精彩等你发现!Based on the ET framework, we pay tribute to LOL's Moba game, providing a complete state frame synchronization framework, including predictive rollback logic, a skill system based on double-ended behavior trees, and more exciting things waiting for you to discover!
|
|
|
streetwriters/notesnook-sync-server
Sync server for Notesnook (self-hosting in alpha)
|
|
| meziantou/Meziantou.Framework | |
|
dotnetGame/MineCase
Minecraft server based on Orleans
|
|
|
SharpRepository/SharpRepository
C# Generic Repository for use with Entity Framework, RavenDB and more with built-in caching options.
|
|
|
imazen/resizer
The official repository for ImageResizer
|
|
|
jeangatto/ASP.NET-Core-Clean-Architecture-CQRS-Event-Sourcing
ASP.NET Core, C#, CQRS Event Sourcing, REST API, DDD, SOLID Principles and Clean Architecture
|
|
|
magicdict/MongoCola
A MongoDB Administration Tool
|
| Version | Downloads | Last Updated |
|---|---|---|
| 3.9.0 | 534,054 | 5/27/2026 |
| 3.8.1 | 840,409 | 5/11/2026 |
| 3.8.0 | 886,882 | 4/20/2026 |
| 3.7.1 | 1,610,255 | 3/18/2026 |
| 3.7.0 | 866,718 | 3/2/2026 |
| 3.6.0 | 2,592,266 | 1/15/2026 |
| 3.5.2 | 3,432,591 | 11/27/2025 |
| 3.5.1 | 538,486 | 11/19/2025 |
| 3.5.0 | 5,010,376 | 9/10/2025 |
| 3.4.3 | 2,391,237 | 8/18/2025 |
| 3.4.2 | 1,948,554 | 7/25/2025 |
| 3.4.1 | 673,575 | 7/16/2025 |
| 3.4.0 | 6,350,741 | 5/1/2025 |
| 3.3.0 | 3,596,633 | 3/27/2025 |
| 3.2.1 | 3,601,041 | 2/20/2025 |
| 3.2.0 | 1,070,178 | 2/12/2025 |
| 3.1.0 | 6,503,038 | 12/5/2024 |
| 3.0.0 | 11,766,067 | 10/16/2024 |
| 2.30.0 | 11,286,966 | 10/16/2024 |
| 2.29.0 | 6,862,081 | 9/18/2024 |