XpoNoSql.MongoDatabase
0.2.0
dotnet add package XpoNoSql.MongoDatabase --version 0.2.0
NuGet\Install-Package XpoNoSql.MongoDatabase -Version 0.2.0
<PackageReference Include="XpoNoSql.MongoDatabase" Version="0.2.0" />
<PackageVersion Include="XpoNoSql.MongoDatabase" Version="0.2.0" />
<PackageReference Include="XpoNoSql.MongoDatabase" />
paket add XpoNoSql.MongoDatabase --version 0.2.0
#r "nuget: XpoNoSql.MongoDatabase, 0.2.0"
#:package XpoNoSql.MongoDatabase@0.2.0
#addin nuget:?package=XpoNoSql.MongoDatabase&version=0.2.0
#tool nuget:?package=XpoNoSql.MongoDatabase&version=0.2.0
XpoNoSql.MongoDatabase
A custom MongoDB-backed XPO DataStore for DevExpress XPO
(IDataStore, SimpleDataLayer, ThreadSafeDataLayer compatible).
This provider translates XPO SelectStatements, ModificationStatements, CriteriaOperator trees, joins, aggregates, and subqueries into MongoDB aggregation pipelines — allowing XPO to run seamlessly on MongoDB.
✨ Features
- Full XPO
SelectStatement→ MongoDB$match,$lookup,$group,$project,$sort - CriteriaOperator support:
- Binary operators, group operators, function operators
- LIKE with SQL-style
%/_semantics (converted to regex) - StartsWith / EndsWith / Contains
- Case sensitivity respected via
XpoDefault.DefaultCaseSensitive
- Joins:
- Inner joins
- Left Outer joins
- Self-joins
- Aggregates:
- Count, Sum, Avg, Min, Max, Exists
- Subqueries (inside WHERE / HAVING / projections)
- Materialization to
SelectStatementResultandXPView - CRUD:
- Insert / Update / Delete with optimistic locking
- Identity generation via atomic counter collection
🚀 Quick Start
Minimal setup to run XPO against MongoDB:
using DevExpress.Xpo;
using XpoNoSql.MongoDatabase;
// Register the provider so XPO can resolve the "MongoDB" connection string scheme.
MongoConnectionProvider.Register();
// Build the MongoDB XPO connection string.
string connectionString =
MongoConnectionProvider.GetConnectionString(
connectionUri: "mongodb://localhost:27017",
databaseName: "XpoMongoDemo");
// Create the XPO IDataStore using the built-in DevExpress factory.
IDataStore provider =
XpoDefault.GetConnectionProvider(connectionString, AutoCreateOption.DatabaseAndSchema);
// Assign the application's data layer.
XpoDefault.DataLayer = new SimpleDataLayer(provider);
// Use XPO as usual.
using (var uow = new UnitOfWork())
{
var customer = new TestCustomer(uow) { Name = "Alice" };
uow.CommitChanges();
}
No extra plumbing required. All XPO operations — queries, joins, grouping, aggregates, and CRUD — automatically run through your MongoDB-backed provider.
🚧 Current Limits / Work in Progress
No standalone transaction support (Mongo does not require explicit Begin/Commit in this provider) Some advanced XPO functions still unimplemented Update/Delete with subqueries may not be fully supported Multi-database support planned Pull requests welcome 🚀
📦 Installation
clone the repository:
git clone https://github.com/gbonaros/XpoNoSql.MongoDatabase.git
or install from NuGet
dotnet add package XpoNoSql.MongoDatabase
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. |
-
net8.0
- DevExpress.Data (>= 25.1.7)
- DevExpress.Xpo (>= 25.1.7)
- MongoDB.Driver (>= 3.5.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.