Deveel.Repository.EntityFramework
1.5.0
dotnet add package Deveel.Repository.EntityFramework --version 1.5.0
NuGet\Install-Package Deveel.Repository.EntityFramework -Version 1.5.0
<PackageReference Include="Deveel.Repository.EntityFramework" Version="1.5.0" />
<PackageVersion Include="Deveel.Repository.EntityFramework" Version="1.5.0" />
<PackageReference Include="Deveel.Repository.EntityFramework" />
paket add Deveel.Repository.EntityFramework --version 1.5.0
#r "nuget: Deveel.Repository.EntityFramework, 1.5.0"
#:package Deveel.Repository.EntityFramework@1.5.0
#addin nuget:?package=Deveel.Repository.EntityFramework&version=1.5.0
#tool nuget:?package=Deveel.Repository.EntityFramework&version=1.5.0
Deveel Repository
Deveel Repository is a lightweight .NET framework that provides a principled implementation of the Repository Pattern, designed to help developers build applications grounded in Domain-Driven Design (DDD) and SOLID principles.
The framework abstracts data access behind a clean, stable interface — keeping your domain model independent of any specific persistence technology — while integrating seamlessly with popular data-access libraries as the underlying backing store.
Why Deveel Repository?
At its core, Deveel Repository is about keeping your domain clean.
In Domain-Driven Design the repository is not merely a data-access helper: it is the boundary between the domain model and the infrastructure layer. It speaks the language of the domain (entities, aggregates, identities) while hiding every detail of how data is fetched or persisted.
This library was born from the need to have a consistent, framework-agnostic abstraction for this boundary, without forcing application developers to:
- couple their domain logic to a specific ORM or database driver, or
- re-implement the same boilerplate repository scaffolding in every project.
It was never the intention to build another ORM. Object-Relational Mappers (and document-mapper equivalents) such as Entity Framework Core, Dapper, or MongoFramework are excellent tools for mapping objects to storage. Deveel Repository uses them — it does not replace them.
Deveel Repository vs. ORMs
The table below highlights the key differences and shows how both layers coexist:
| Concern | ORM (EF Core, Dapper, …) | Deveel Repository |
|---|---|---|
| Responsibility | Map objects ↔ database tables / documents | Provide a domain-oriented access interface |
| Speaks the language of | Database schema, SQL, drivers | Domain model (entities, aggregates) |
| Knows about | Tables, columns, change tracking, transactions | Collections of entities and their identities |
| Lives in layer | Infrastructure | Domain / Application boundary |
| Used by | Repositories and infrastructure code | Application services and domain services |
In practice, you create a repository on top of an ORM — the ORM handles low-level persistence while Deveel Repository defines what the application can ask for. For example, Deveel.Repository.EntityFramework wraps Entity Framework Core's DbContext behind the IRepository<TEntity> interface, giving the domain a stable contract that survives database migrations and EF Core upgrades. The same principle applies to Deveel.Repository.MongoFramework (backed by MongoFramework / MongoDB) and any custom driver you care to write.
This is not a limitation — it is by design. Decoupling ORMs from domain logic is one of the most impactful architectural decisions you can make for long-term maintainability.
Libraries
The framework is organized into a kernel package (providing interfaces and abstractions) and a set of driver packages that wire those abstractions to concrete data sources.
- Stable releases are published to NuGet.org.
- Pre-release / unstable builds are available from the GitHub Packages feed (
https://nuget.pkg.github.com/deveel/index.json).
| Package | Description | NuGet (stable) | Downloads (NuGet) |
|---|---|---|---|
Deveel.Repository.Core |
Kernel abstractions: interfaces, base types, and DI extensions | ||
Deveel.Repository.InMemory |
Volatile, in-process repository — ideal for testing and prototyping | ||
Deveel.Repository.EntityFramework |
Repository driver backed by Entity Framework Core | ||
Deveel.Repository.MongoFramework |
Repository driver backed by MongoFramework / MongoDB | ||
Deveel.Repository.MongoFramework.MultiTenant |
Multi-tenant MongoDB connection management via Finbuckle.MultiTenant | ||
Deveel.Repository.DynamicLinq |
Filter / query support via System.Linq.Dynamic.Core | ||
Deveel.Repository.Manager |
Business layer (EntityManager) with validation, normalization, event sourcing, and logging | ||
Deveel.Repository.Manager.DynamicLinq |
Dynamic LINQ query extensions for the Entity Manager | ||
Deveel.Repository.Manager.EasyCaching |
Second-level caching for the Entity Manager via EasyCaching | ||
Deveel.Repository.Manager.AspNetCore |
ASP.NET Core integration for automatic HTTP request cancellation | ||
Deveel.Repository.States.Core |
Entity state management abstractions (experimental) |
Quick Start
1. Install a driver package
Pick the driver that matches your data source. The Core kernel package is pulled in automatically as a transitive dependency:
# Entity Framework Core
dotnet add package Deveel.Repository.EntityFramework
# MongoDB
dotnet add package Deveel.Repository.MongoFramework
# In-Memory (testing / prototyping)
dotnet add package Deveel.Repository.InMemory
To consume an unstable pre-release build, add the GitHub Packages feed first:
dotnet nuget add source https://nuget.pkg.github.com/deveel/index.json \
--name deveel-github --username <your-github-username> --password <your-pat>
2. Register the repository
Use the AddRepository<T> extension on IServiceCollection:
// Program.cs / Startup.cs
builder.Services.AddRepository<InMemoryRepository<Order>>();
After registration the following services are resolvable from the DI container (availability depends on the concrete repository's capabilities):
| Interface | Description |
|---|---|
IRepository<TEntity> |
Core CRUD and single-entity look-ups |
IQueryableRepository<TEntity> |
LINQ-based queries |
IPageableRepository<TEntity> |
Paginated result sets |
IFilterableRepository<TEntity> |
Filter-expression–based queries |
3. Consume the repository in your services
public class OrderService(IRepository<Order> orders)
{
public Task<Order?> GetAsync(string id, CancellationToken ct)
=> orders.FindByIdAsync(id, ct);
public Task PlaceAsync(Order order, CancellationToken ct)
=> orders.AddAsync(order, ct);
}
For driver-specific configuration, multi-tenancy, and guidance on writing a custom repository, refer to the full documentation or browse it online at GitBook.
Documentation and Guides
| Topic | Description |
|---|---|
| Getting Started | Installation, requirements, and first steps |
| Entity Framework Core driver | Storing entities via EF Core |
| MongoDB driver | Storing entities in MongoDB |
| In-Memory driver | In-process volatile storage |
| Entity Manager | Business layer with validation, caching, and events |
| Custom repositories | Write your own driver |
| Multi-Tenancy | Tenant-isolated repositories |
Full documentation is also available on GitBook.
Roadmap
We are actively building Deveel Repository toward a comprehensive, production-ready framework. See the complete roadmap for detailed feature descriptions, timelines, and architectural decisions.
Release Timeline
v1.5.0 — "Solid Ground"
Package Namespace Correction
Thread-Safe In-Memory Repository
Expression Compilation Cache
Full .NET 10 Compatibility and Benchmark Baseline
XML Documentation Completeness
Conversion to ValueTask Results for Asynchronous Methods
General Performance Optimizations
v1.6.0 — "Developer Flow"
- Unified Repository Setup Builder
- QueryBuilder Execution Extensions
- Pluggable Cache Provider Abstraction
- Automatic Timestamp and Ownership Management
- Repository Health Checks
- Repository Controller Lifecycle Redesign
v1.7.0 — "Entity Lifecycle"
- Soft Delete Support
- Entity State Machine
- Domain Event Emission from EntityManager
v1.8.0 — "Scale & Throughput"
- Batch Operations in EntityManager
- Async Streaming Queries
- Read/Write Repository Split
v1.9.0 — "Observability & Governance"
- OpenTelemetry Integration
- Audit Trail Support
- EF Core Multi-Tenancy Parity
v2.0.0 — "Platform Modernization"
- Minimum .NET 9 Baseline
- Simplified Repository Interface Hierarchy
- Repository Source Generators
v2.1.0 — "New Database Drivers"
- PostgreSQL Native Driver
- Azure Cosmos DB Driver
- Dapper Repository Driver
- Service-Based Repository Driver
- Neo4j Repository Driver
For more details on features, design rationale, and success criteria, see the ROADMAP.
License
The project is licensed under the terms of the Apache Public License v2, which allows unrestricted use in any project — open-source or commercial — without restriction.
Contributing
The project is open to contributions. Please read the contributing guidelines before opening a pull request.
Contributors
A huge thank-you to everyone who has contributed code, documentation, bug reports, and ideas:
Contributions of all kinds are welcome — see CONTRIBUTING.md to get started.
| 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 is compatible. 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 is compatible. 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. |
-
net10.0
- Deveel.Repository.Core (>= 1.5.0)
- Microsoft.EntityFrameworkCore (>= 10.0.5)
-
net8.0
- Deveel.Repository.Core (>= 1.5.0)
- Microsoft.EntityFrameworkCore (>= 8.0.16)
-
net9.0
- Deveel.Repository.Core (>= 1.5.0)
- Microsoft.EntityFrameworkCore (>= 9.0.15)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Deveel.Repository.EntityFramework:
| Package | Downloads |
|---|---|
|
Deveel.Repository.EntityFramework.Benchmarks
Package Description |
|
|
Deveel.Webhooks.EntityFramework
An implementation of the Deveel Webhooks storage layer based on the Entity Framework ORM |
|
|
Deveel.Events.Publisher.Outbox.EntityFramework
Provides an Entity Framework implementation of the IOutboxMessageRepository for the Deveel Events Outbox Publisher. |
|
|
Deveel.Events.Publisher.DeadLetter.EntityFramework
Provides an Entity Framework persistence layer for dead-letter message storage and replay. |
|
|
repobench
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.5.0 | 0 | 5/20/2026 |
| 1.5.0-alpha0003 | 66 | 5/15/2026 |
| 1.4.3 | 1,290 | 7/23/2025 |
| 1.4.2 | 633 | 7/22/2025 |
| 1.4.1 | 663 | 7/21/2025 |
| 1.4.0 | 166 | 7/5/2025 |
| 1.3.3 | 244 | 6/30/2025 |
| 1.3.2 | 238 | 6/26/2025 |
| 1.3.1 | 284 | 9/21/2024 |
| 1.3.0 | 592 | 3/15/2024 |
| 1.2.7 | 1,150 | 10/28/2023 |
| 1.2.6 | 587 | 10/25/2023 |
| 1.2.5 | 588 | 10/20/2023 |
| 1.2.0 | 611 | 10/13/2023 |
| 1.1.7 | 612 | 10/9/2023 |