MongoDB.Bson
3.0.0
Prefix Reserved
dotnet add package MongoDB.Bson --version 3.0.0
NuGet\Install-Package MongoDB.Bson -Version 3.0.0
<PackageReference Include="MongoDB.Bson" Version="3.0.0" />
paket add MongoDB.Bson --version 3.0.0
#r "nuget: MongoDB.Bson, 3.0.0"
// Install MongoDB.Bson as a Cake Addin #addin nuget:?package=MongoDB.Bson&version=3.0.0 // Install MongoDB.Bson as a Cake Tool #tool nuget:?package=MongoDB.Bson&version=3.0.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.
Product | Versions 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. |
.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. |
-
.NETFramework 4.7.2
- System.Memory (>= 4.5.5)
- System.Runtime.CompilerServices.Unsafe (>= 5.0.0)
-
.NETStandard 2.1
- System.Memory (>= 4.5.5)
- System.Runtime.CompilerServices.Unsafe (>= 5.0.0)
-
net6.0
- System.Memory (>= 4.5.5)
- System.Runtime.CompilerServices.Unsafe (>= 5.0.0)
NuGet packages (770)
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 5 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
|
Version | Downloads | Last updated |
---|---|---|
3.0.0 | 222,295 | 10/16/2024 |
2.30.0 | 229,242 | 10/16/2024 |
2.29.0 | 739,324 | 9/18/2024 |
2.28.0 | 3,026,541 | 7/23/2024 |
2.27.0 | 1,697,522 | 6/28/2024 |
2.26.0 | 831,981 | 6/12/2024 |
2.25.0 | 3,605,538 | 4/12/2024 |
2.24.0 | 3,244,449 | 2/21/2024 |
2.23.2 | 129,989 | 2/20/2024 |
2.23.1 | 4,796,959 | 12/15/2023 |
2.23.0 | 520,810 | 12/11/2023 |
2.22.0 | 6,346,685 | 10/9/2023 |
2.21.0 | 4,482,502 | 8/10/2023 |
2.20.0 | 4,989,751 | 6/21/2023 |
2.19.2 | 2,824,425 | 5/25/2023 |
2.19.1 | 7,239,611 | 3/27/2023 |
2.19.0 | 9,444,774 | 1/27/2023 |
2.18.0 | 9,885,265 | 10/14/2022 |
2.17.1 | 10,402,651 | 7/30/2022 |
2.17.0 | 1,280,194 | 7/18/2022 |
2.16.1 | 2,460,763 | 6/21/2022 |
2.16.0 | 1,399,685 | 6/7/2022 |
2.15.1 | 4,131,517 | 5/4/2022 |
2.15.0 | 5,194,784 | 3/9/2022 |
2.14.1 | 14,031,268 | 12/3/2021 |
2.14.0 | 1,448,187 | 11/24/2021 |
2.14.0-beta1 | 58,564 | 10/15/2021 |
2.13.3 | 3,379,627 | 11/23/2021 |
2.13.2 | 9,165,094 | 10/6/2021 |
2.13.1 | 6,834,811 | 8/4/2021 |
2.13.0 | 1,742,188 | 7/13/2021 |
2.13.0-beta1 | 137,180 | 3/31/2021 |
2.12.5 | 139,848 | 11/20/2021 |
2.12.4 | 3,034,795 | 6/4/2021 |
2.12.3 | 2,705,658 | 5/4/2021 |
2.12.2 | 2,647,550 | 4/7/2021 |
2.12.1 | 1,468,633 | 3/23/2021 |
2.12.0 | 4,607,330 | 3/3/2021 |
2.12.0-beta1 | 139,709 | 11/6/2020 |
2.11.6 | 9,421,967 | 1/20/2021 |
2.11.5 | 3,892,480 | 12/2/2020 |
2.11.4 | 2,728,938 | 11/4/2020 |
2.11.3 | 4,315,844 | 10/15/2020 |
2.11.2 | 6,362,110 | 9/10/2020 |
2.11.1 | 1,245,772 | 8/25/2020 |
2.11.0 | 2,136,551 | 7/30/2020 |
2.11.0-beta2 | 27,763 | 6/10/2020 |
2.11.0-beta1 | 70,267 | 4/10/2020 |
2.10.4 | 9,509,052 | 5/5/2020 |
2.10.3 | 2,146,310 | 4/7/2020 |
2.10.2 | 6,083,485 | 2/14/2020 |
2.10.1 | 3,484,704 | 1/15/2020 |
2.10.0 | 6,629,738 | 12/10/2019 |
2.10.0-beta1 | 58,034 | 10/2/2019 |
2.9.3 | 3,746,901 | 11/8/2019 |
2.9.2 | 4,140,951 | 9/30/2019 |
2.9.1 | 7,432,600 | 8/21/2019 |
2.9.0 | 420,059 | 8/15/2019 |
2.9.0-beta2 | 43,938 | 6/17/2019 |
2.9.0-beta1 | 64,283 | 3/13/2019 |
2.8.1 | 7,342,073 | 5/15/2019 |
2.8.0 | 4,664,699 | 3/13/2019 |
2.7.3 | 2,833,452 | 1/24/2019 |
2.7.2 | 4,642,593 | 11/10/2018 |
2.7.1 | 58,765 | 11/8/2018 |
2.7.0 | 6,557,739 | 6/27/2018 |
2.7.0-beta0001 | 39,118 | 4/22/2018 |
2.6.1 | 1,554,791 | 5/17/2018 |
2.6.0 | 800,624 | 4/24/2018 |
2.5.1 | 706,606 | 4/19/2018 |
2.5.0 | 3,619,210 | 12/12/2017 |
2.4.4 | 15,774,518 | 6/8/2017 |
2.4.3 | 2,313,526 | 3/9/2017 |
2.4.2 | 428,051 | 2/2/2017 |
2.4.1 | 204,670 | 1/4/2017 |
2.4.0 | 772,552 | 11/29/2016 |
2.4.0-beta1 | 22,302 | 10/5/2016 |
2.3.0 | 7,605,685 | 9/23/2016 |
2.3.0-rc1 | 91,691 | 8/29/2016 |
2.3.0-beta1 | 14,703 | 8/3/2016 |
2.2.4 | 865,553 | 5/18/2016 |
2.2.3 | 595,216 | 2/2/2016 |
2.2.2 | 95,739 | 1/15/2016 |
2.2.1 | 27,584 | 1/8/2016 |
2.2.0 | 154,892 | 12/7/2015 |
2.2.0-rc0 | 7,429 | 11/18/2015 |
2.1.1 | 182,208 | 11/11/2015 |
2.1.0 | 101,598 | 10/19/2015 |
2.1.0-rc1 | 11,087 | 10/7/2015 |
2.1.0-rc0 | 9,188 | 9/17/2015 |
2.0.2 | 65,390 | 11/11/2015 |
2.0.1 | 399,923 | 6/8/2015 |
2.0.0 | 449,978 | 4/2/2015 |
2.0.0-rc0 | 19,425 | 3/17/2015 |
2.0.0-beta4 | 6,070 | 3/9/2015 |
2.0.0-beta3 | 5,417 | 3/5/2015 |
2.0.0-beta2 | 6,692 | 2/4/2015 |
2.0.0-beta1 | 7,398 | 1/16/2015 |