CleanArchAcceleratorTools.Application 1.0.1

dotnet add package CleanArchAcceleratorTools.Application --version 1.0.1
                    
NuGet\Install-Package CleanArchAcceleratorTools.Application -Version 1.0.1
                    
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="CleanArchAcceleratorTools.Application" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CleanArchAcceleratorTools.Application" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="CleanArchAcceleratorTools.Application" />
                    
Project file
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 CleanArchAcceleratorTools.Application --version 1.0.1
                    
#r "nuget: CleanArchAcceleratorTools.Application, 1.0.1"
                    
#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 CleanArchAcceleratorTools.Application@1.0.1
                    
#: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=CleanArchAcceleratorTools.Application&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=CleanArchAcceleratorTools.Application&version=1.0.1
                    
Install as a Cake Tool

CleanArchAcceleratorTools.Application

This module is part of CleanArchAcceleratorTools, a toolkit to accelerate building applications with Clean Architecture. The Application module contains application services, DTOs/ViewModels, and orchestrates use cases. It references the Domain and repository layers to implement business logic without direct data access.

Related modules:

📄 License: MIT


🧠 Principles

🔗 Role in the architecture

  • Controller: Exposes endpoints, it does not contain business rules.
  • Application: Orchestrates use cases and references the Domain and repository.
  • Domain: Pure domain with business rules and validations.
  • Infrastructure: Implements persistence/mapping for Domain entities.
  • Mediator: Handles commands, queries, and notifications.

✨ Features

Repositories methods through repository and domain services dependency injection

  • Dynamic Selects – Project typed objects based on property names.
  • Dynamic Filtering – Filter queries with a fluent builder using clauses and operators.
  • Dynamic Sort – Sort queries with multiple fields and directions.
  • Pagination Utilities – Helpers for IQueryable including filtering and ordering.
  • Repositories Methods Use all repositories methods without any extra code.
  • Extensible & Lightweight – Modular, discoverable, and easy to integrate.

ViewModels

  • DynamicFilterViewModel – Class for building dynamic filters for queries.
  • DynamicSortViewModel – Class for building dynamic sort orders for queries.
  • EntityViewModel base Class for domain entities with common properties.
  • PaginationResultViewModel – Class for paginated query results.
  • QueryFilterViewModel – Class for encapsulating query filter parameters used in pagination.

Unit of Work

  • IUnitOfWork – Interface for managing transactions and coordinating repository operations.
  • UnitOfWork – Implementation of the Unit of Work pattern to ensure data integrity and consistency.
  • Manage multiple repository operations within a single transaction.
  • Suport to multiple DbContexts and factory pattern.

🧩 Compatibility

Multi-target:

  • .NET 6
  • .NET 7
  • .NET 8
  • .NET 9

Use an EF Core version compatible with your target framework.


🚀 Installation

dotnet add package CleanArchAcceleratorTools.Application --version 1.0.0

⚡ Quickstart

  1. If you have separated Controller/Api project add this module reference on it. Add allInOne if using a single project.
  2. Model your ViewModels inheriting from EntityViewModel.
  3. Create your services inheriting from IGenericApplicationService<TEntity, TEntityViewModel> and GenericApplicationService<TEntity, TEntityViewModel> (rememenber to add it to dependency injection).
  4. Use all available repository methods without extra code.
  5. Create your custom methods if needed.
  6. Enjoy all features provided!

🛠️ Usage Examples

Creating an Application ViewModel

public class CourseViewModel : EntityViewModel
{
    public long? InstructorId { get; set; }
    public string? Title { get; set; }
    public InstructorViewModel? Instructor { get; set; }
    public ICollection<ModuleViewModel>? Modules { get; set; }
}

Creating an Application Service

public interface ICourseApplicationService : IGenericApplicationService<Course, CourseViewModel>{ }

public class CourseApplicationService : GenericApplicationService<Course, CourseViewModel>, ICourseApplicationService
{
    private readonly ICourseDomainService _courseDomainService;

    public CourseApplicationService(
        ICourseRepository courseRepository,
        ICourseDomainService domainService,
        IUnitOfWork unitOfWork,        
        ICleanArchMediator mediator,
        INotificationHandler<DomainNotificationEvent> notifications,
        IApplicationLogger applicationLogger) : base(courseRepository, domainService, unitOfWork, mediator, notifications, applicationLogger)
    {
        _courseDomainService = domainService;
    }
}

...

// Usage
var allCourses = await _courseApplicationService.GetAllAsync();

📚 Example Project

See the - CleanArchAcceleratorTools.Examples project for a complete working example, including setup and advanced scenarios. It implements a fully working API with all other modules implemented.


🧠 Tips

  • Prefer DynamicSelect to reduce materialization and network payloads.
  • Centralize selection fields in a constant for reuse as in CourseSelects.

🤝 Contributing

Contributions are welcome! Open issues or submit PRs for features, bug fixes, or documentation improvements. Contributing guidelines are under construction.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 is compatible.  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 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on CleanArchAcceleratorTools.Application:

Package Downloads
CleanArchAcceleratorTools.Controller

This module is part of CleanArchAcceleratorTools, a toolkit to accelerate building applications with Clean Architecture.

CleanArchAcceleratorTools.AllInOne

This module is part of CleanArchAcceleratorTools, a toolkit to accelerate building applications with Clean Architecture.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 361 12/17/2025
1.0.0 332 12/17/2025