MinimalCleanArch 0.1.18-preview
dotnet add package MinimalCleanArch --version 0.1.18-preview
NuGet\Install-Package MinimalCleanArch -Version 0.1.18-preview
<PackageReference Include="MinimalCleanArch" Version="0.1.18-preview" />
<PackageVersion Include="MinimalCleanArch" Version="0.1.18-preview" />
<PackageReference Include="MinimalCleanArch" />
paket add MinimalCleanArch --version 0.1.18-preview
#r "nuget: MinimalCleanArch, 0.1.18-preview"
#:package MinimalCleanArch@0.1.18-preview
#addin nuget:?package=MinimalCleanArch&version=0.1.18-preview&prerelease
#tool nuget:?package=MinimalCleanArch&version=0.1.18-preview&prerelease
MinimalCleanArch (Core)
Core primitives for Clean Architecture: entities, repositories, specifications, result pattern, and common types.
Version
- Current preview: 0.1.18-preview (net9.0, net10.0). Latest stable: 0.1.17.
Why Use It
- define entities, repository contracts, specifications, and result types without taking a dependency on EF Core, HTTP, or messaging frameworks
- keep business rules in the domain layer while allowing infrastructure packages to plug in later
- share a stable contract layer across application, infrastructure, and API projects
When to Use It
- use it in every MCA-based solution
- put domain entities, repository abstractions, specifications, and shared operation results here
- choose this package alone when you want clean domain modeling without committing yet to EF Core or Minimal API helpers
Dependency Direction
- Depends on: no other MCA package
- Typically referenced by: domain, application, infrastructure, and API projects
- Safe direction: every other MCA package can depend on this package
- Avoid: putting EF Core, HTTP, logging, or transport-specific concerns in projects that only reference this package
Contents
- Domain entities:
IEntity<TKey>,BaseEntity<TKey>,BaseAuditableEntity,BaseSoftDeleteEntity,IAuditableEntity,ISoftDelete. - Common types:
Result/Result<T>,Error(status code + metadata support, withMatch/Bindhelpers). - Repositories:
IRepository<TEntity, TKey>,IUnitOfWork. - Specifications:
ISpecification<T>,BaseSpecification<T>, composableAnd/Or/Not,InMemorySpecificationEvaluator, and query flags (AsNoTracking,AsSplitQuery,IgnoreQueryFilters,IsCountOnly).
Design Guidance
- Keep domain entities, repository contracts, result types, and specifications here.
- Do not put EF Core, HTTP, or transport concerns in projects that depend only on this package.
- Let application, infrastructure, and API layers build on this package instead of bypassing it with ad hoc shared abstractions.
Usage
dotnet add package MinimalCleanArch --version 0.1.18-preview
Use BaseAuditableEntity/BaseSoftDeleteEntity for entities that need auditing and soft delete. Use Result/Result<T> for typed operation results.
Specification example
// Build a filter
public sealed class TodoFilterSpec : BaseSpecification<Todo>
{
public TodoFilterSpec(string? search, bool? isCompleted, int? priority)
{
if (!string.IsNullOrWhiteSpace(search))
{
AddCriteria(t => t.Title.Contains(search) || t.Description.Contains(search));
}
if (isCompleted is not null)
{
AddCriteria(t => t.IsCompleted == isCompleted);
}
if (priority is not null)
{
AddCriteria(t => t.Priority == priority);
}
ApplyOrderByDescending(t => t.Priority);
}
}
// Compose at call-site
var highPriority = new TodoFilterSpec(null, false, 5);
var dueToday = new DueTodaySpec();
var todayHighPriority = highPriority.And(dueToday);
public sealed class DueTodaySpec : BaseSpecification<Todo>
{
public DueTodaySpec() : base(t => t.DueDate == DateOnly.FromDateTime(DateTime.UtcNow))
{
}
}
Guidance:
- keep specifications focused on business filters and query shape
- compose specifications at the application boundary instead of duplicating predicates
- keep repository interfaces in the domain layer and implementations in infrastructure
- use
InMemorySpecificationEvaluatoronly for tests or in-memory execution paths
When consuming locally built nupkgs, add a nuget.config pointing to your local feed (e.g., artifacts/nuget) before restoring.
| 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. |
-
net10.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (5)
Showing the top 5 NuGet packages that depend on MinimalCleanArch:
| Package | Downloads |
|---|---|
|
MinimalCleanArch.Extensions
Extensions for Minimal API endpoints, including validation filters, error handling, logging, health checks, and standard response definitions. |
|
|
MinimalCleanArch.Validation
Validation components for MinimalCleanArch using FluentValidation, including extensions for service registration. |
|
|
MinimalCleanArch.DataAccess
Entity Framework Core implementation for MinimalCleanArch |
|
|
MinimalCleanArch.Messaging
Messaging and event-driven architecture for MinimalCleanArch using Wolverine. Includes domain events, transactional outbox, and background job processing. |
|
|
MinimalCleanArch.Audit
Optional audit logging package for MinimalCleanArch. Provides audit log tables, change history tracking, and audit query services. Opt-in feature - only adds overhead when explicitly enabled. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.18-preview | 0 | 3/12/2026 |
| 0.1.17 | 0 | 3/12/2026 |
| 0.1.17-preview | 125 | 3/8/2026 |
| 0.1.16-preview | 128 | 3/7/2026 |
| 0.1.15-preview | 136 | 3/3/2026 |
| 0.1.14 | 153 | 3/2/2026 |
| 0.1.14-preview | 143 | 3/1/2026 |
| 0.1.13-preview | 142 | 2/28/2026 |
| 0.1.12-preview | 157 | 2/22/2026 |
| 0.1.11-preview | 159 | 12/27/2025 |
| 0.1.10-preview | 153 | 12/27/2025 |
| 0.1.9-preview | 185 | 12/21/2025 |
| 0.1.8-preview | 288 | 12/15/2025 |
| 0.1.7 | 223 | 12/14/2025 |
| 0.1.7-preview | 472 | 12/11/2025 |
| 0.1.6 | 493 | 12/9/2025 |
| 0.1.6-preview | 586 | 12/9/2025 |
| 0.1.5 | 256 | 12/6/2025 |
| 0.1.4 | 226 | 5/26/2025 |
| 0.1.3 | 219 | 5/25/2025 |