PGMS.CQSLight
5.0.0.5
dotnet add package PGMS.CQSLight --version 5.0.0.5
NuGet\Install-Package PGMS.CQSLight -Version 5.0.0.5
<PackageReference Include="PGMS.CQSLight" Version="5.0.0.5" />
<PackageVersion Include="PGMS.CQSLight" Version="5.0.0.5" />
<PackageReference Include="PGMS.CQSLight" />
paket add PGMS.CQSLight --version 5.0.0.5
#r "nuget: PGMS.CQSLight, 5.0.0.5"
#:package PGMS.CQSLight@5.0.0.5
#addin nuget:?package=PGMS.CQSLight&version=5.0.0.5
#tool nuget:?package=PGMS.CQSLight&version=5.0.0.5
Introduction
PGMS.CQSLight is a small, open-source library that provides a simple and easy-to-use interface for implementing the Command Query Separation (CQS) pattern in .NET Core applications. The library is designed to be lightweight, flexible, and easy to test.
The CQS pattern is a software design pattern that separates the responsibility of executing a command from the responsibility of querying data. The pattern is based on the idea that a method or function should either change the state of the system or retrieve data, but not both.
In PGMS.CQSLight, commands and queries are separated into different interfaces, and each command and query is handled by a specific handler. The library also provides a simple interface for dispatching commands and handling queries.
PGMS.CQSLight is built with SOLID principles, which makes the code maintainable, scalable, and testable. It's an easy to use library, and it's a good fit for small and medium-sized projects that need to implement the CQS pattern.
PGMS.CQSLight
Core CQS Light framework with DirectBus implementation
This is the main package that provides the core infrastructure for implementing the Command Query Separation pattern in your .NET applications.
Key Features
- Command Handling: Base classes for command handlers (
BaseCommandHandler,BaseCommandHandlerAsync) that support validation, event publishing, and transaction management - Query Processing: Query processor (
IQueryProcessor) with support for synchronous and asynchronous query handling, including caching capabilities - DirectBus: Lightweight message bus (
IBus) for publishing events and sending commands with automatic handler resolution using Autofac - Event Handling: Event handler infrastructure (
IHandleEvent) for processing domain events within transactions - Security: Built-in role-based authorization support for commands with
AllowedRolesattributes - Validation: Integrated validation support using
ValidationResultwith automatic validation execution - Helpers:
CommandHelperandQueryHelperutilities to simplify command and query execution
Core Interfaces
ICommand/IQuery<TResult>: Marker interfaces for commands and queriesIHandleCommand<T>/IHandleQuery<TQuery, TResult>: Handler interfacesIBus: Message bus for event publishing and command dispatchingIQueryProcessor: Query execution with optional caching
This package is the foundation for all other PGMS.CQSLight packages and is required for implementing the CQS pattern in your application.
Getting Started
Have a look at our sample app based on PGMS.CQSLight: GitHub Repository
Version 5.X ⇒ DotNet 10.0
Version 4.X ⇒ DotNet 8.0
Version 3.X ⇒ DotNet 6.0
Version 2.X ⇒ DotNet 5.0
| 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
- Autofac.Extensions.DependencyInjection (>= 10.0.0)
- Microsoft.Data.SqlClient (>= 6.1.3)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Newtonsoft.Json (>= 13.0.4)
- PGMS.Data (>= 5.0.0.5)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on PGMS.CQSLight:
| Package | Downloads |
|---|---|
|
PGMS.BlazorComponents
Blazor Component to use with CQSLight |
|
|
PGMS.CQSLight.UnitTestUtilities
Unitests utilities for PGMS.CQSLight - Fake impementations of Transaction, UnitOfWork - In Memory EntityRepository |
|
|
PGMS.AdvBlazorComponents
Advanced Blazor components library built on Blazorise — async data grids with paging, sorting and advanced search, dropdown selects, rich text editors, chip displays, loading spinners and built-in licensing components for .NET Blazor applications. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 5.0.0.5 | 1,803 | 3/21/2026 | |
| 5.0.0.4 | 126 | 3/21/2026 | |
| 5.0.0.2 | 1,047 | 2/21/2026 | |
| 5.0.0.1 | 877 | 12/8/2025 | |
| 5.0.0 | 850 | 11/17/2025 | |
| 5.0.0-RC2 | 234 | 11/14/2025 | |
| 5.0.0-RC1 | 238 | 11/14/2025 | |
| 4.2.12.12 | 137 | 3/21/2026 | |
| 4.2.12.10 | 141 | 3/5/2026 | |
| 4.2.12.10-RC2 | 15,615 | 12/15/2025 | |
| 4.2.12.10-RC1 | 300 | 12/15/2025 | |
| 4.2.12.9 | 5,548 | 12/8/2025 | |
| 4.2.12.8 | 11,073 | 10/14/2025 | |
| 4.2.12.7 | 254 | 10/14/2025 | |
| 4.2.12.6 | 2,650 | 9/26/2025 | |
| 4.2.11.10 | 120 | 3/21/2026 | |
| 4.2.11.9 | 228 | 3/17/2026 | |
| 4.2.11.8 | 134 | 3/17/2026 | |
| 4.2.11.7 | 130 | 3/17/2026 | |
| 4.2.11.6 | 136 | 3/5/2026 |