Devart.Data.MongoDB
1.0.248
Prefix Reserved
dotnet add package Devart.Data.MongoDB --version 1.0.248
NuGet\Install-Package Devart.Data.MongoDB -Version 1.0.248
<PackageReference Include="Devart.Data.MongoDB" Version="1.0.248" />
<PackageVersion Include="Devart.Data.MongoDB" Version="1.0.248" />
<PackageReference Include="Devart.Data.MongoDB" />
paket add Devart.Data.MongoDB --version 1.0.248
#r "nuget: Devart.Data.MongoDB, 1.0.248"
#:package Devart.Data.MongoDB@1.0.248
#addin nuget:?package=Devart.Data.MongoDB&version=1.0.248
#tool nuget:?package=Devart.Data.MongoDB&version=1.0.248
ADO.NET Provider for MongoDB
dotConnect for MongoDB is an ADO.NET data provider for MongoDB. Its built-in SQL engine exposes MongoDB collections as tables, so the data can be queried and changed with SQL, DataSet/DataTable and Entity Framework Core, while native MongoDB commands remain available.
The provider works with .NET Framework, .NET Core, .NET.
More information at dotConnect for MongoDB.
Installation
- Install the NuGet Package
Install-Package Devart.Data.MongoDB
- Activate license
- Free Trial License: Evaluate the full capabilities of dotConnect for MongoDB in a non-commercial environment—ideal for development and testing. Start your free trial
- Commercial License: Deploy dotConnect for MongoDB in commercial applications and access full technical support with a valid license. Purchase a license
MongoDB C Driver
The provider works through the MongoDB C Driver 1.23 (libmongoc). The Devart.Data.MongoDB package carries it for Windows x86 and x64 - libmongoc-1.0.dll, libbson-1.0.dll, sqlite3.dll of the SQL engine and the Visual C++ runtime vcruntime140.dll - and they are copied to the build output: into runtimes\win-x86|x64\native for .NET, into the Native\win-x86 / Native\win-x64 subfolders for .NET Framework. To use other copies, specify their folder with the Native Library Path connection string parameter.
Work with EF Core
For projects using Entity Framework Core with MongoDB, install the Devart.Data.MongoDB.EFCore package.
Compatibility
The following table show which version of this package to use with which version of frameworks.
| Frameworks | Version support |
|---|---|
| .NET | 11, 10, 9, 8, 7, 6, 5 |
| .NET Core | 3.1, 3.0, 2.2, 2.1, 2.0 |
| .NET Framework | 4.8, 4.7, 4.6, 4.5.1 |
Key Features
- SQL for MongoDB: Query collections with
SELECT, joins and aggregates, and change them withINSERT,UPDATE,DELETE, through the built-in SQL engine. - Native commands: Run MongoDB JSON commands and read the result documents directly.
- Transactions:
BeginTransactionandTransactionScoperun the commands in a MongoDB transaction on a replica set or a sharded cluster. - Full ADO.NET Compatibility: Supports
DbConnection,DbCommand,DbDataReader,DbDataAdapter,DataSetandDataTablefor seamless integration into .NET applications. - Entity Framework Core: LINQ queries and
SaveChangesfor MongoDB collections with the Devart.Data.MongoDB.EFCore package. - Real-Time Monitoring: Track database operations using the dbMonitor utility.
- Visual Studio Integration: Server Explorer, typed DataSet generation and component editors in Visual Studio.
- Priority Support and Continuous Improvement: Backed by dedicated technical support and regular updates.
Usage
To help you get started quickly, here's a simple code example demonstrating how to connect to a MongoDB database and query a collection with SQL.
using Devart.Data.MongoDB;
namespace MongoDBConsoleApp
{
class Program
{
static void Main(string[] args)
{
string connectionString = "Host=localhost;Port=27017;Database=test;User Id=user;Password=password;Sql Engine=True;License Key=**********";
using (MongoDBConnection connection = new MongoDBConnection(connectionString))
{
connection.Open();
using (MongoDBCommand command = new MongoDBCommand("SELECT name FROM customers LIMIT 10", connection))
using (var reader = command.ExecuteReader())
{
while (reader.Read())
Console.WriteLine(reader.GetString(0));
}
}
}
}
}
Basic Connection Strings
| Property | Meaning |
|---|---|
| Host | The name or IP address of the MongoDB server. |
| Port | The port of the MongoDB server, 27017 by default. |
| Database | The database to work with. |
| User Id | The user name. |
| Password | The password of the user. |
| Sql Engine | If True, the collections are queried with SQL as tables; if False, the commands are native MongoDB JSON commands. |
| License Key | Specify your license key in this parameter. |
For more detailed tutorials, API reference, and advanced examples, visit our Getting Started guide.
Related Packages
Support Area
| Product | Versions 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. 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. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.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 was computed. |
| .NET Framework | net451 is compatible. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. 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. |
-
.NETFramework 4.5.1
- Devart.Data (>= 7.0.248)
-
.NETStandard 2.0
- Devart.Data (>= 7.0.248)
- Newtonsoft.Json (>= 13.0.3)
- System.Diagnostics.PerformanceCounter (>= 10.0.5)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Devart.Data.MongoDB:
| Package | Downloads |
|---|---|
|
Devart.Data.MongoDB.EFCore
dotConnect for MongoDB is an ADO.NET data provider for MongoDB. Its built-in SQL engine exposes MongoDB collections as tables, so the data can be queried and changed with SQL, DataSet/DataTable and Entity Framework Core, while native MongoDB commands remain available. The provider works with .NET Framework 4.5.1+, .NET Core 2.0+ and .NET 5+. This package adds Entity Framework Core 11 support. More information at https://www.devart.com/dotconnect/mongodb/ License See pricing options for ordering https://www.devart.com/dotconnect/mongodb/ordering.html The NuGet package initiates the retrieval of an activation key from the Devart website. This key is required to activate the product for a free trial. Key Features * SQL for MongoDB: Query collections with SELECT, JOIN, GROUP BY and update them with INSERT, UPDATE, DELETE through the built-in SQL engine. * Native commands: Run MongoDB JSON commands and read the result documents directly. * Entity Framework Core: LINQ queries and SaveChanges for MongoDB collections. * Support and updates: Enjoy dedicated support team for prompt issue resolution and regular updates to keep your software running smoothly and securely. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.248 | 0 | 11/12/2026 |