![]() |
VOOZH | about |
dotnet add package MongoDB.Driver.Core --version 2.30.0
NuGet\Install-Package MongoDB.Driver.Core -Version 2.30.0
<PackageReference Include="MongoDB.Driver.Core" Version="2.30.0" />
<PackageVersion Include="MongoDB.Driver.Core" Version="2.30.0" />Directory.Packages.props
<PackageReference Include="MongoDB.Driver.Core" />Project file
paket add MongoDB.Driver.Core --version 2.30.0
#r "nuget: MongoDB.Driver.Core, 2.30.0"
#:package MongoDB.Driver.Core@2.30.0
#addin nuget:?package=MongoDB.Driver.Core&version=2.30.0Install as a Cake Addin
#tool nuget:?package=MongoDB.Driver.Core&version=2.30.0Install as a Cake Tool
You can get the latest stable release from the official Nuget.org feed or from our github releases page.
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 was computed. 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 | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 is compatible. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. 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 | tizen40 tizen40 was computed. 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.Driver.Core:
| Package | Downloads |
|---|---|
|
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 |
|
|
ExtentReports.Core
Forked from extent-framework/extentreports-csharp. Modified version of Extent Reporting Framework, Community Edition, supporting .NET Core and .NET Standard |
|
|
Naos.Deployment.Persistence
Created on 2026-03-26 18:58 |
|
|
Naos.Deployment.Core
Created on 2026-03-26 18:57 |
Showing the top 20 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教程姊妹篇,官方文档:
|
|
|
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.
|
|
|
SkyAPM/SkyAPM-dotnet
The .NET/.NET Core instrument agent for Apache SkyWalking
|
|
|
streetwriters/notesnook-sync-server
Sync server for Notesnook (self-hosting in alpha)
|
|
|
imazen/resizer
The official repository for ImageResizer
|
|
|
fullstackhero/dotnet-microservices-boilerplate
The Ultimate Microservices Starter Kit for .NET Developers!
|
|
|
magicdict/MongoCola
A MongoDB Administration Tool
|
|
|
Eventuous/eventuous
Event Sourcing library for .NET
|
|
|
zkweb-framework/ZKWeb
A flexible web framework supports .Net Framework and .Net Core
|
|
|
yukuyoulei/ILRuntime_HotGames
基于ILRuntime的热更新能力实现的可以直接使用的框架,友情赠送C# WebService + WebSocketServer服务器端。
|
|
|
daxnet/Apworks
Apworks is a flexible, scalable, configurable and efficient .NET based application development framework that helps software developers to easily build enterprise applications by applying either Classic Layering or Command-Query Responsibility Segregation (CQRS) architectural patterns.
|
|
|
TcOpenGroup/TcOpen
Application framework for industrial automation built on top of TwinCAT3 and .NET.
|
|
|
alexandre-spieser/mongodb-generic-repository
An example of generic repository implementation using the MongoDB C# Sharp 2.0 driver (async)
|
|
|
roadkillwiki/roadkill
A modern .NET Wiki
|
|
|
yc-l/yc.boilerplate
YC. Boilerplate is a set of loose coupling, flexible combination, complete functions, convenient development, and reduces the workload of development.
|
|
|
daxnet/we-text
WeText is a sample application that demonstrates the implementation of DDD/CQRS and microservice architectural patterns in C#.
|
|
|
socioboard/socioboard-core
This is an old repo, for latest maintained version go here - https://github.com/socioboard/Socioboard-Core-3.0
|
| Version | Downloads | Last Updated |
|---|---|---|
| 2.30.0 | 11,124,971 | 10/16/2024 |
| 2.29.0 | 6,440,290 | 9/18/2024 |
| 2.28.0 | 21,410,572 | 7/23/2024 |
| 2.27.0 | 5,680,317 | 6/28/2024 |
| 2.26.0 | 2,040,880 | 6/12/2024 |
| 2.25.0 | 8,876,216 | 4/12/2024 |
| 2.24.0 | 6,697,827 | 2/21/2024 |
| 2.23.2 | 237,805 | 2/20/2024 |
| 2.23.1 | 8,432,754 | 12/15/2023 |
| 2.23.0 | 899,958 | 12/11/2023 |
| 2.22.0 | 11,485,397 | 10/9/2023 |
| 2.21.0 | 7,354,042 | 8/10/2023 |
| 2.20.0 | 7,411,403 | 6/21/2023 |
| 2.19.2 | 4,647,996 | 5/25/2023 |
| 2.19.1 | 8,807,436 | 3/27/2023 |
| 2.19.0 | 14,844,737 | 1/27/2023 |
| 2.18.0 | 10,753,016 | 10/14/2022 |
| 2.17.1 | 11,661,010 | 7/30/2022 |
| 2.17.0 | 1,395,665 | 7/18/2022 |
| 2.16.1 | 2,426,283 | 6/21/2022 |