MongoDB.Bson 3.3.0

Prefix Reserved
dotnet add package MongoDB.Bson --version 3.3.0
                    
NuGet\Install-Package MongoDB.Bson -Version 3.3.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MongoDB.Bson" Version="3.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MongoDB.Bson" Version="3.3.0" />
                    
Directory.Packages.props
<PackageReference Include="MongoDB.Bson" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MongoDB.Bson --version 3.3.0
                    
#r "nuget: MongoDB.Bson, 3.3.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=MongoDB.Bson&version=3.3.0
                    
Install MongoDB.Bson as a Cake Addin
#tool nuget:?package=MongoDB.Bson&version=3.3.0
                    
Install MongoDB.Bson as a Cake Tool

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.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (812)

Showing the top 5 NuGet packages that depend on MongoDB.Bson:

Package Downloads
MongoDB.Driver.Core

Core Component of the Official MongoDB .NET Driver.

MongoDB.Driver

Official .NET driver for MongoDB.

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

GitHub repositories (57)

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
fanliang11/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 ,The service engine supports http, TCP, WS,Grpc, Thrift,Mqtt, UDP, and DNS protocols. It uses ZooKeeper and Consul as a registry, and integrates it. Hash, random, polling, Fair Polling as a load balancing algorithm, built-in service governance to ensure reliable RPC communication, the engine contains Diagnostic, link tracking for protocol and middleware calls, and integration SkyWalking Distributed APM
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
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. 👍👍👍
realm/realm-dotnet
Realm is a mobile database: a replacement for SQLite & ORMs
grandnode/grandnode2
E-commerce platform built with ASP.NET Core using MongoDB for NoSQL storage
SteveDunn/Vogen
A semi-opinionated library which is a source generator and a code analyser. It Source generates Value Objects
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!
dotnetGame/MineCase
Minecraft server based on Orleans
qq362946/Fantasy
C # Game Framework, but not limited to games. Can be used for non game business development
meziantou/Meziantou.Framework
SharpRepository/SharpRepository
C# Generic Repository for use with Entity Framework, RavenDB and more with built-in caching options.
streetwriters/notesnook-sync-server
Sync server for Notesnook (self-hosting in alpha)
imazen/resizer
The official repository for ImageResizer
magicdict/MongoCola
A MongoDB Administration Tool
zkweb-framework/ZKWeb
A flexible web framework supports .Net Framework and .Net Core
Version Downloads Last updated
3.3.0 213,943 24 days ago
3.2.1 739,628 2 months ago
3.2.0 204,534 2 months ago
3.1.0 1,905,593 4 months ago
3.0.0 2,266,245 6 months ago
2.30.0 2,392,665 6 months ago
2.29.0 1,946,536 7 months ago
2.28.0 8,812,664 9 months ago
2.27.0 3,145,029 10 months ago
2.26.0 1,377,126 6/12/2024
2.25.0 5,429,514 4/12/2024
2.24.0 4,389,612 2/21/2024
2.23.2 171,200 2/20/2024
2.23.1 6,185,250 12/15/2023
2.23.0 682,285 12/11/2023
2.22.0 8,200,890 10/9/2023
2.21.0 5,604,174 8/10/2023
2.20.0 6,275,275 6/21/2023
2.19.2 3,360,909 5/25/2023
2.19.1 8,233,479 3/27/2023
2.19.0 11,313,127 1/27/2023
2.18.0 10,586,063 10/14/2022
2.17.1 11,201,472 7/30/2022
2.17.0 1,363,865 7/18/2022
2.16.1 2,577,773 6/21/2022
2.16.0 1,502,236 6/7/2022
2.15.1 4,319,301 5/4/2022
2.15.0 5,394,792 3/9/2022
2.14.1 14,959,242 12/3/2021
2.14.0 1,492,826 11/24/2021
2.14.0-beta1 58,851 10/15/2021
2.13.3 4,236,225 11/23/2021
2.13.2 9,953,170 10/6/2021
2.13.1 7,153,363 8/4/2021
2.13.0 1,814,465 7/13/2021
2.13.0-beta1 141,861 3/31/2021
2.12.5 146,660 11/20/2021
2.12.4 3,138,769 6/4/2021
2.12.3 2,776,207 5/4/2021
2.12.2 2,746,382 4/7/2021
2.12.1 1,510,511 3/23/2021
2.12.0 5,099,909 3/3/2021
2.12.0-beta1 141,719 11/6/2020
2.11.6 9,942,091 1/20/2021
2.11.5 4,015,062 12/2/2020
2.11.4 2,820,814 11/4/2020
2.11.3 4,499,510 10/15/2020
2.11.2 6,435,912 9/10/2020
2.11.1 1,272,179 8/25/2020
2.11.0 2,205,661 7/30/2020
2.11.0-beta2 28,058 6/10/2020
2.11.0-beta1 70,554 4/10/2020
2.10.4 9,783,671 5/5/2020
2.10.3 2,211,376 4/7/2020
2.10.2 6,204,094 2/14/2020
2.10.1 3,567,115 1/15/2020
2.10.0 7,399,123 12/10/2019
2.10.0-beta1 58,455 10/2/2019
2.9.3 3,866,313 11/8/2019
2.9.2 4,233,810 9/30/2019
2.9.1 7,635,379 8/21/2019
2.9.0 426,821 8/15/2019
2.9.0-beta2 44,111 6/17/2019
2.9.0-beta1 65,278 3/13/2019
2.8.1 7,794,112 5/15/2019
2.8.0 5,026,199 3/13/2019
2.7.3 2,906,450 1/24/2019
2.7.2 4,772,888 11/10/2018
2.7.1 62,218 11/8/2018
2.7.0 6,661,169 6/27/2018
2.7.0-beta0001 39,324 4/22/2018
2.6.1 1,599,423 5/17/2018
2.6.0 811,769 4/24/2018
2.5.1 762,058 4/19/2018
2.5.0 3,706,482 12/12/2017
2.4.4 16,939,282 6/8/2017
2.4.3 2,365,197 3/9/2017
2.4.2 451,923 2/2/2017
2.4.1 213,355 1/4/2017
2.4.0 797,577 11/29/2016
2.4.0-beta1 22,699 10/5/2016
2.3.0 8,221,161 9/23/2016
2.3.0-rc1 95,124 8/29/2016
2.3.0-beta1 14,865 8/3/2016
2.2.4 884,422 5/18/2016
2.2.3 606,207 2/2/2016
2.2.2 98,461 1/15/2016
2.2.1 27,837 1/8/2016
2.2.0 157,424 12/7/2015
2.2.0-rc0 7,579 11/18/2015
2.1.1 184,393 11/11/2015
2.1.0 106,022 10/19/2015
2.1.0-rc1 11,249 10/7/2015
2.1.0-rc0 9,361 9/17/2015
2.0.2 68,496 11/11/2015
2.0.1 406,357 6/8/2015
2.0.0 462,566 4/2/2015
2.0.0-rc0 19,594 3/17/2015
2.0.0-beta4 6,224 3/9/2015
2.0.0-beta3 5,554 3/5/2015
2.0.0-beta2 6,849 2/4/2015
2.0.0-beta1 7,617 1/16/2015