AccountSubSystem.Handlers
1.0.0
dotnet add package AccountSubSystem.Handlers --version 1.0.0
NuGet\Install-Package AccountSubSystem.Handlers -Version 1.0.0
<PackageReference Include="AccountSubSystem.Handlers" Version="1.0.0" />
<PackageVersion Include="AccountSubSystem.Handlers" Version="1.0.0" />
<PackageReference Include="AccountSubSystem.Handlers" />
paket add AccountSubSystem.Handlers --version 1.0.0
#r "nuget: AccountSubSystem.Handlers, 1.0.0"
#:package AccountSubSystem.Handlers@1.0.0
#addin nuget:?package=AccountSubSystem.Handlers&version=1.0.0
#tool nuget:?package=AccountSubSystem.Handlers&version=1.0.0
AccountSubSystem.Handlers
CQRS command and query handlers for the BDJobs Account SubSystem.
This package is the top-level orchestration layer of the Account SubSystem. It contains all the Handler classes that process commands (write operations) and queries (read operations), wiring together the Repositories, Aggregate Roots, and the Service Bus — following the CQRS pattern used across all BDJobs subsystems.
📦 Installation
.NET CLI
dotnet add package AccountSubSystem.Handlers --version 1.0.0
Package Manager Console
NuGet\Install-Package AccountSubSystem.Handlers -Version 1.0.0
PackageReference (add to your .csproj)
<PackageReference Include="AccountSubSystem.Handlers" Version="1.0.0" />
📋 Requirements
| Requirement | Value |
|---|---|
| Target Framework | .NET 10.0 |
| Package Version | 1.0.0 |
📁 What's Inside
This package contains:
- Query Handlers — process read requests (e.g.
GetUserQueryHandler,GetBillTrackingQueryHandler) - Command Handlers — process write requests (e.g.
CreateUserCommandHandler) - DI registration —
AddAccountHandlers()extension to register all handlers in one call - Validation — FluentValidation validators wired per handler via the Service Bus pipeline
🚀 Usage
Step 1 — Register handlers in Program.cs
builder.Services.AddAccountHandlers(builder.Configuration);
Step 2 — Dispatch a query from your Controller
using AccountSubSystem.DTOs;
[ApiController]
[Route("api/[controller]")]
public class AccountController : ControllerBase
{
private readonly IServiceBus _serviceBus;
public AccountController(IServiceBus serviceBus)
{
_serviceBus = serviceBus;
}
[HttpGet("{userId}")]
public async Task<IActionResult> GetUser(int userId)
{
var query = new GetUserQuery { UserId = userId };
var result = await _serviceBus.SendAsync(query);
return Ok(result);
}
}
Step 3 — How a Handler looks internally
public class GetUserQueryHandler : IQueryHandler<GetUserQuery, UserResponseDto>
{
private readonly IUserRepository _repository;
public GetUserQueryHandler(IUserRepository repository)
{
_repository = repository;
}
public async Task<UserResponseDto> Handle(GetUserQuery query)
{
// 1. Fetch raw data from DB
var entities = await _repository.GetByIdAsync(query.UserId);
// 2. Build Aggregate Root
var aggregateRoot = UserAggregateRoot.FromEntities(entities);
// 3. Apply business rules
aggregateRoot.ApplyBusinessRules();
// 4. Return DTO
return aggregateRoot.ToResponseDto();
}
}
🔗 Dependencies
This package is the top of the AccountSubSystem tree and pulls in all other AccountSubSystem packages automatically:
| Package | Version |
|---|---|
AccountSubSystem.Aggregators |
1.0.0 |
AccountSubSystem.DTOs |
1.0.0 |
AccountSubSystem.Repositories |
1.0.0 |
ServiceBus.Handler |
1.0.0 |
SharedSubSystem.DTOs |
1.0.0 |
SharedSubSystem.Handler |
1.0.0 |
SharedSubSystem.Services |
1.0.0 |
All dependencies are installed automatically. You only need to install
AccountSubSystem.Handlersand everything else comes with it.
🏗️ Architecture
AccountSubSystem.Handlers is at the top of the AccountSubSystem dependency tree. Installing this single package gives you the entire AccountSubSystem stack.
AccountSubSystem.Handlers ← YOU ARE HERE (installs everything below)
├── AccountSubSystem.Aggregators
│ └── AccountSubSystem.DTOs
├── AccountSubSystem.Repositories
│ └── AccountSubSystem.Aggregators
├── ServiceBus.Handler
│ └── SharedSubSystem.Handler
├── SharedSubSystem.DTOs
├── SharedSubSystem.Handler
└── SharedSubSystem.Services
Full data flow:
HTTP Request
→ API Controller
→ IServiceBus.SendAsync(query)
→ Handler.Handle(query) ← HERE
→ Repository.GetAsync()
→ AggregateRoot.FromEntities()
→ ApplyBusinessRules()
→ ToResponseDto()
→ HTTP Response
⚠️ Notes
- If you only need DTOs (e.g. in a client project), install
AccountSubSystem.DTOsinstead — it is much lighter. - If you need the domain logic without database access, install
AccountSubSystem.Aggregators. - Install
AccountSubSystem.Handlersonly in your API or subsystem project that actually processes requests.
👤 Author
BDJobs — Internal NuGet package for the BDJobs Conveyance Billing System.
| Product | Versions 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. |
-
net10.0
- AccountSubSystem.Aggregators (>= 1.0.0)
- AccountSubSystem.DTOs (>= 1.0.0)
- AccountSubSystem.Repositories (>= 1.0.0)
- ServiceBus.Handler (>= 1.0.0)
- SharedSubSystem.DTOs (>= 1.0.0)
- SharedSubSystem.Handler (>= 1.0.0)
- SharedSubSystem.Services (>= 1.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on AccountSubSystem.Handlers:
| Package | Downloads |
|---|---|
|
AccountSubSystem.Auth
Login and cookie authentication for AccountSubSystem. Install this to add auth to any subsystem. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 136 | 6/18/2026 |