MongoDB.Driver.Core 2.29.0

Prefix Reserved
dotnet add package MongoDB.Driver.Core --version 2.29.0                
NuGet\Install-Package MongoDB.Driver.Core -Version 2.29.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.Driver.Core" Version="2.29.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MongoDB.Driver.Core --version 2.29.0                
#r "nuget: MongoDB.Driver.Core, 2.29.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.
// Install MongoDB.Driver.Core as a Cake Addin
#addin nuget:?package=MongoDB.Driver.Core&version=2.29.0

// Install MongoDB.Driver.Core as a Cake Tool
#tool nuget:?package=MongoDB.Driver.Core&version=2.29.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 Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  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 (264)

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

Package Downloads
MongoDB.Driver

Official .NET driver for MongoDB.

MongoDB.Driver.GridFS

GridFS Component of the Official MongoDB .NET Driver.

Elastic.Apm.MongoDb

Elastic APM integration with the MongoDB.Driver package.

mongocsharpdriver

This package contains the legacy driver. The new driver's package name is MongoDB.Driver

MongoDB.Driver.Core.Extensions.DiagnosticSources

Package Description

GitHub repositories (31)

Showing the top 5 popular GitHub repositories that depend on MongoDB.Driver.Core:

Repository Stars
ServiceStack/ServiceStack
Thoughtfully architected, obscenely fast, thoroughly enjoyable web services for all
anjoy8/Blog.Core
💖 ASP.NET Core 8.0 全家桶教程,前后端分离后端接口,vue教程姊妹篇,官方文档:
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.
Version Downloads Last updated
2.29.0 5,796 9/18/2024
2.28.0 1,107,962 7/23/2024
2.27.0 1,031,541 6/28/2024
2.26.0 567,826 6/12/2024
2.25.0 2,747,593 4/12/2024
2.24.0 2,625,322 2/21/2024
2.23.2 103,252 2/20/2024
2.23.1 3,972,994 12/15/2023
2.23.0 429,891 12/11/2023
2.22.0 5,382,490 10/9/2023
2.21.0 3,756,154 8/10/2023
2.20.0 4,138,348 6/21/2023
2.19.2 2,426,044 5/25/2023
2.19.1 6,148,449 3/27/2023
2.19.0 8,178,730 1/27/2023
2.18.0 8,655,376 10/14/2022
2.17.1 9,471,380 7/30/2022
2.17.0 1,165,025 7/18/2022
2.16.1 2,128,950 6/21/2022
2.16.0 1,260,932 6/7/2022
2.15.1 3,786,208 5/4/2022
2.15.0 4,468,722 3/9/2022
2.14.1 12,175,124 12/3/2021
2.14.0 1,367,482 11/24/2021
2.14.0-beta1 58,000 10/15/2021
2.13.3 3,347,728 11/23/2021
2.13.2 8,014,701 10/6/2021
2.13.1 5,953,644 8/4/2021
2.13.0 1,532,672 7/13/2021
2.13.0-beta1 62,140 3/31/2021
2.12.5 100,899 11/20/2021
2.12.4 2,795,462 6/4/2021
2.12.3 2,431,787 5/4/2021
2.12.2 2,310,875 4/7/2021
2.12.1 1,339,758 3/23/2021
2.12.0 4,316,077 3/3/2021
2.12.0-beta1 127,101 11/6/2020
2.11.6 9,022,664 1/20/2021
2.11.5 3,596,845 12/2/2020
2.11.4 2,260,418 11/4/2020
2.11.3 2,703,144 10/15/2020
2.11.2 6,196,848 9/10/2020
2.11.1 1,142,352 8/25/2020
2.11.0 1,997,196 7/30/2020
2.11.0-beta2 26,598 6/10/2020
2.11.0-beta1 62,252 4/10/2020
2.10.4 8,607,160 5/5/2020
2.10.3 1,875,216 4/7/2020
2.10.2 5,580,594 2/14/2020
2.10.1 3,151,553 1/15/2020
2.10.0 6,222,811 12/10/2019
2.10.0-beta1 47,120 10/2/2019
2.9.3 3,406,370 11/8/2019
2.9.2 3,895,484 9/30/2019
2.9.1 6,984,038 8/21/2019
2.9.0 345,500 8/15/2019
2.9.0-beta2 41,213 6/17/2019
2.9.0-beta1 51,664 3/13/2019
2.8.1 6,522,035 5/15/2019
2.8.0 4,544,121 3/13/2019
2.7.3 2,707,479 1/24/2019
2.7.2 4,536,931 11/10/2018
2.7.1 48,520 11/8/2018
2.7.0 6,310,745 6/27/2018
2.7.0-beta0001 36,676 4/22/2018
2.6.1 1,313,648 5/17/2018
2.6.0 743,546 4/24/2018
2.5.1 676,213 4/19/2018
2.5.0 3,333,231 12/12/2017
2.4.4 14,266,667 6/8/2017
2.4.3 1,266,090 3/9/2017
2.4.2 402,549 2/2/2017
2.4.1 193,678 1/4/2017
2.4.0 747,572 11/29/2016
2.4.0-beta1 20,540 10/5/2016
2.3.0 7,403,790 9/23/2016
2.3.0-rc1 86,443 8/29/2016
2.3.0-beta1 12,756 8/3/2016
2.2.4 843,906 5/18/2016
2.2.3 537,716 2/2/2016
2.2.2 62,977 1/15/2016
2.2.1 25,518 1/8/2016
2.2.0 150,163 12/7/2015
2.2.0-rc0 6,024 11/18/2015
2.1.1 179,365 11/11/2015
2.1.0 96,878 10/19/2015
2.1.0-rc1 10,222 10/7/2015
2.1.0-rc0 7,680 9/17/2015
2.0.2 63,719 11/11/2015
2.0.1 371,591 6/8/2015
2.0.0 393,082 4/2/2015
2.0.0-rc0 17,955 3/17/2015
2.0.0-beta4 4,594 3/9/2015
2.0.0-beta3 4,185 3/5/2015
2.0.0-beta2 5,255 2/4/2015
2.0.0-beta1 5,744 1/16/2015