AccountSubSystem.Aggregators 1.0.0

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

AccountSubSystem.Aggregators

Domain Aggregate Roots and business logic for the BDJobs Account SubSystem.

This package contains the core domain objects (Aggregate Roots) of the Account SubSystem. These classes own all business rules, validations, and state transitions related to accounts and users — following Clean Architecture and DDD (Domain-Driven Design) principles.


📦 Installation

.NET CLI

dotnet add package AccountSubSystem.Aggregators --version 1.0.0

Package Manager Console

NuGet\Install-Package AccountSubSystem.Aggregators -Version 1.0.0

PackageReference (add to your .csproj)

<PackageReference Include="AccountSubSystem.Aggregators" Version="1.0.0" />

📋 Requirements

Requirement Value
Target Framework .NET 10.0
Package Version 1.0.0

📁 What's Inside

The Aggregators layer is the heart of the domain. Each Aggregate Root in this package:

  • Holds the domain state (loaded from the database via Repositories)
  • Applies business rules via methods like ApplyBusinessRules()
  • Converts entities to response DTOs via ToResponseDto() / ToGroupedResponseDto()
  • Is constructed from raw entities using FromEntities() static factory methods

🚀 Usage

Step 1 — Inject via Handler

Aggregate Roots are typically constructed inside your Handlers after loading data from the Repository:

using AccountSubSystem.Aggregators;

Step 2 — Load and apply business rules

// In your Handler:
var entities = await _repository.GetUsersByFilterAsync(query);

var aggregateRoot = UserAggregateRoot.FromEntities(entities);
aggregateRoot.ApplyBusinessRules();

var response = aggregateRoot.ToResponseDto();
return response;

Step 3 — Static factory pattern

Aggregate Roots use a static FromEntities() method to keep construction clean and testable:

var root = AccountAggregateRoot.FromEntities(rawUserList, requestDto);

🔗 Dependencies

Package Version
AccountSubSystem.DTOs 1.0.0

AccountSubSystem.DTOs is installed automatically.


🏗️ Architecture

AccountSubSystem.Aggregators sits in the domain layer — above DTOs, below Handlers and Repositories.

AccountSubSystem.Handlers
    └── AccountSubSystem.Aggregators  ← YOU ARE HERE
    └── AccountSubSystem.Repositories
        └── AccountSubSystem.Aggregators  ← YOU ARE HERE

AccountSubSystem.Aggregators
    └── AccountSubSystem.DTOs

Data flow:

API Controller
    → Handler
        → Repository  (fetches raw data from DB)
        → AggregateRoot.FromEntities()  ← HERE
            → ApplyBusinessRules()
            → ToResponseDto()
        → returns DTO to Controller

👤 Author

BDJobs — Internal NuGet package for the BDJobs Conveyance Billing System.

Product Compatible and additional computed target framework versions.
.NET 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.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on AccountSubSystem.Aggregators:

Package Downloads
AccountSubSystem.Auth

Login and cookie authentication for AccountSubSystem. Install this to add auth to any subsystem.

AccountSubSystem.Repositories

Package Description

AccountSubSystem.Handlers

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 158 6/18/2026