MinimalCleanArch.DataAccess
0.1.17
dotnet add package MinimalCleanArch.DataAccess --version 0.1.17
NuGet\Install-Package MinimalCleanArch.DataAccess -Version 0.1.17
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="MinimalCleanArch.DataAccess" Version="0.1.17" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MinimalCleanArch.DataAccess" Version="0.1.17" />
<PackageReference Include="MinimalCleanArch.DataAccess" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MinimalCleanArch.DataAccess --version 0.1.17
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MinimalCleanArch.DataAccess, 0.1.17"
#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.
#:package MinimalCleanArch.DataAccess@0.1.17
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MinimalCleanArch.DataAccess&version=0.1.17
#tool nuget:?package=MinimalCleanArch.DataAccess&version=0.1.17
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MinimalCleanArch
A Clean Architecture toolkit for Minimal APIs on .NET 9 and .NET 10, with vertical-slice-style application organization inside clean dependency boundaries.
What This Helps You Achieve
- keep domain rules, repository contracts, and specifications separate from infrastructure concerns
- add EF Core persistence without pushing EF types into the domain layer
- bootstrap Minimal API applications with consistent validation, error handling, OpenAPI, rate limiting, and operational defaults
- opt into messaging, audit logging, and encryption only when the application actually needs them
- scaffold new applications with a package set that already follows the intended dependency direction
Architectural Style
- project and package boundaries follow Clean Architecture dependency direction
- application use cases are organized in a vertical-slice/CQRS-friendly style rather than around large layered service classes
- the intent is not “pure vertical slices with no shared layers”; it is clean boundaries plus feature-oriented handlers and endpoints
Core Features
- Domain building blocks (entities, repositories, unit of work, specifications, result pattern)
- Minimal API helpers (validation wiring, standardized error handling, OpenAPI + Scalar)
- Security and encryption (Data Protection/AES column encryption)
- Soft delete and auditing support
- EF Core integration with specification evaluation
Recommended Package Sets
- Core domain and repository abstractions:
MinimalCleanArch - EF Core repositories and specifications:
MinimalCleanArch.DataAccess - Minimal API bootstrap, error mapping, OpenAPI, rate limiting:
MinimalCleanArch.Extensions - FluentValidation registration:
MinimalCleanArch.Validation - Domain events and Wolverine integration:
MinimalCleanArch.Messaging - Audit interception and audit queries:
MinimalCleanArch.Audit - Encrypted EF properties and encryption services:
MinimalCleanArch.Security - Project scaffolding:
MinimalCleanArch.Templates
Versions
- Stable packages/templates:
0.1.17 - Next preview line:
0.1.18-preview
Local Validation
- Template validation uses two package sources by default: the local
MinimalCleanArchfeed andnuget.org. - This is required because generated projects reference both
MinimalCleanArch.*packages and pinned third-party packages. - Use local-feed-only validation only if your feed mirrors every external dependency used by the templates.
Try It Fast
dotnet new install MinimalCleanArch.Templates
dotnet new mca -n QuickStart --single-project --recommended
cd QuickStart
dotnet run
Then open https://localhost:<port>/scalar/v1.
For auth + OpenIddict + Scalar password flow:
dotnet new mca -n QuickAuth --single-project --auth --tests --mcaVersion 0.1.17
cd QuickAuth
dotnet run
Use the auth walkthrough in templates/README.md.
Preferred Integration Path
For new applications, the recommended order is:
- Model entities, repository contracts, and specifications with
MinimalCleanArch. - Add EF Core repositories and unit of work with
MinimalCleanArch.DataAccess. - Add API bootstrap with
MinimalCleanArch.Extensions. - Register application validators with
MinimalCleanArch.Validation. - Add
MinimalCleanArch.Messaging,MinimalCleanArch.Audit, andMinimalCleanArch.Securityonly when the app actually needs them.
Preferred defaults:
- use specifications through
IRepository<TEntity, TKey> - use
AddMinimalCleanArchApi(...)as the main API bootstrap method - use
AddValidationFromAssemblyContaining<T>()for validator registration - use
AddMinimalCleanArchMessaging...extensions instead of wiring Wolverine from scratch - use Data Protection-based encryption for new development
- use
IExecutionContextas the shared source for user, tenant, and correlation data across HTTP and message-handler flows
Dependency Direction
MinimalCleanArchis the foundation. Other MCA packages can depend on it; your domain layer can depend on it.MinimalCleanArch.DataAccessdepends onMinimalCleanArchand belongs in infrastructure.MinimalCleanArch.Extensionsdepends onMinimalCleanArchand belongs in the API/host layer.MinimalCleanArch.Validationdepends onMinimalCleanArchandMinimalCleanArch.Extensions; use it where API validation registration happens.MinimalCleanArch.MessagingandMinimalCleanArch.Auditdepend onMinimalCleanArchand are optional infrastructure/application-host add-ons.MinimalCleanArch.Securityis an optional infrastructure package for encryption concerns.- Domain projects should not reference
DataAccess,Extensions,Validation,Messaging,Audit, orSecurity.
Packages
| Package | Helps achieve | Depends on | Typical layer |
|---|---|---|---|
MinimalCleanArch |
domain model, contracts, specifications, result types | none | Domain |
MinimalCleanArch.DataAccess |
EF Core repositories, unit of work, audited DbContext base types | MinimalCleanArch |
Infrastructure |
MinimalCleanArch.Extensions |
API bootstrap, validation pipeline, error mapping, OpenAPI, rate limiting | MinimalCleanArch |
API/Host |
MinimalCleanArch.Validation |
validator registration and API validation integration | MinimalCleanArch, MinimalCleanArch.Extensions |
API/Host or composition root |
MinimalCleanArch.Security |
encryption services and encrypted EF property support | no MCA package dependency | Infrastructure |
MinimalCleanArch.Messaging |
domain events, Wolverine integration, outbox-capable messaging | MinimalCleanArch |
Infrastructure or host |
MinimalCleanArch.Audit |
audit interception, audit storage, audit queries | MinimalCleanArch |
Infrastructure |
MinimalCleanArch.Templates |
scaffold new MCA-based applications | packaged templates | Project scaffolding |
Documentation Map
- Templates:
templates/README.md - Generated app architecture:
templates/README.md#architecture-overview - Sample app:
samples/MinimalCleanArch.Sample/README.md - Core:
src/MinimalCleanArch/README.md - DataAccess:
src/MinimalCleanArch.DataAccess/README.md - Extensions:
src/MinimalCleanArch.Extensions/README.md - Validation:
src/MinimalCleanArch.Validation/README.md - Security:
src/MinimalCleanArch.Security/README.md - Messaging:
src/MinimalCleanArch.Messaging/README.md - Audit:
src/MinimalCleanArch.Audit/README.md
Contributing
Contributions are welcome. See CONTRIBUTING.md.
License
MIT. See LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Microsoft.AspNetCore.Identity.EntityFrameworkCore (>= 10.0.3)
- Microsoft.EntityFrameworkCore (>= 10.0.3)
- MinimalCleanArch (>= 0.1.17)
-
net9.0
- Microsoft.AspNetCore.Identity.EntityFrameworkCore (>= 9.0.5)
- Microsoft.EntityFrameworkCore (>= 9.0.5)
- MinimalCleanArch (>= 0.1.17)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.17 | 0 | 3/12/2026 |
| 0.1.17-preview | 39 | 3/8/2026 |
| 0.1.16-preview | 34 | 3/7/2026 |
| 0.1.15-preview | 80 | 3/3/2026 |
| 0.1.14 | 92 | 3/2/2026 |
| 0.1.14-preview | 82 | 3/1/2026 |
| 0.1.13-preview | 87 | 2/28/2026 |
| 0.1.12-preview | 100 | 2/22/2026 |
| 0.1.11-preview | 98 | 12/27/2025 |
| 0.1.10-preview | 94 | 12/27/2025 |
| 0.1.9-preview | 124 | 12/21/2025 |
| 0.1.8-preview | 225 | 12/15/2025 |
| 0.1.7 | 163 | 12/14/2025 |
| 0.1.7-preview | 418 | 12/11/2025 |
| 0.1.6 | 438 | 12/9/2025 |
| 0.1.6-preview | 536 | 12/9/2025 |
| 0.1.5 | 223 | 12/6/2025 |
| 0.1.4 | 199 | 5/26/2025 |
| 0.1.3 | 189 | 5/25/2025 |
| 0.1.2 | 189 | 5/25/2025 |
Loading failed