Skip to content
CAI
Software that uses CAICheck a score

microsoft/CQRS.Mediatr.Lite

51.3

Adequate · 8 November 2026

2.2k

lines of production code

C#

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

CQRS.Mediatr.Lite is a lightweight .NET SDK that implements the Command Query Responsibility Segregation (CQRS) pattern using MediatR. It provides core infrastructure for handling commands, queries, and domain events, including support for local and remote execution, dependency injection, and Domain-Driven Design primitives like aggregates and value objects. The system is designed to simplify the construction of ASP.NET Core APIs with clear separation between read and write operations.

Features

Initial release of the CQRS.Mediatr.Lite SDK

This change introduces the initial codebase for the CQRS.Mediatr.Lite SDK, establishing the core infrastructure for Command, Query, and Event handling. It provides base classes for Commands, Queries, and Events, along with corresponding handler abstractions and a central RequestHandler base that enforces request validation. The SDK includes local CommandBus, EventBus, and QueryService implementations that resolve handlers via a dependency injection resolver and support pre/post-processing hooks. Additionally, it adds remote execution capabilities via RemoteCommandBus and RemoteQueryService for deserializing and dispatching requests by name, as well as Domain-Driven Design support through AggregateRoot, Enumeration, and ValueObject base classes.

src/sdk · high confidence

New CQRS sample project demonstrating order management

Added a new sample project, CQRS.Mediatr.Lite.Samples.NetCoreApi, that demonstrates the Command Query Responsibility Segregation (CQRS) pattern using Mediatr.Lite. The sample includes a complete ASP.NET Core API with an OrdersController exposing endpoints to create, retrieve, ship, and deliver orders. It implements domain logic via an OrderAggregateRoot with value objects for Customer, Product, and OrderStatus, and uses in-memory repositories and event stores for persistence and event handling. The solution also includes command and query handlers, event handlers for domain events (OrderCreated, OrderShipped, OrderDelivered), and dependency injection configuration via Autofac.

samples · high confidence

Test coverage

Initial integration and unit test suite for CQRS.Mediatr.Lite

Added a comprehensive test suite covering the core CQRS components, including CommandBus, EventBus, QueryService, and their remote counterparts. The changes introduce integration tests to verify end-to-end request handling and unit tests for domain entities like AggregateRoot and Enumeration, alongside mock implementations for handlers, processors, and events to support these validations.

src/tests · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 54 → 51 (-2.9)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 64 → 64 (+0.0)
  • Architecture 96 → 96 (+0.0)
  • Maturity 45 → 41 (-3.3)
  • Readiness 59 → 59 (+0.0)
  • Security 59 → 54 (-5.6)
  • Domain Modelling 94 → 94 (+0.0)
  • Performance 60 → 60 (+0.0)

Resolved (8)

  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Inconsistent naming for internal identifier fields: some use the standard underscore prefix with the name 'id' (_id), while one uses '_name' for a name field. While semantically distinct, the pattern for IDs is inconsistent with the general C# convention of using 'Id' (PascalCase) or 'Identifier' in public APIs, and the private field naming convention varies between '_id' and potentially other styles if present elsewhere. More critically, '_name' breaks the pattern of '_id' if these are meant to be analogous internal state fields for identity/naming.
  • Low XML-doc coverage: CQRS.Mediatr.Lite.SDK (src/sdk/CQRS.Mediatr.Lite.SDK.csproj)
  • Low XML-doc coverage: CQRS.Mediatr.Lite.Samples.NetCoreApi (samples/CQRS.Mediatr.Lite.Samples/CQRS.Mediatr.Lite.Samples.NetCoreApi/CQRS.Mediatr.Lite.Samples.NetCoreApi.csproj)
  • redundant comment (samples/CQRS.Mediatr.Lite.Samples/CQRS.Mediatr.Lite.Samples.NetCoreApi/CqrsSampleModule.cs)
  • redundant comment (samples/CQRS.Mediatr.Lite.Samples/CQRS.Mediatr.Lite.Samples.NetCoreApi/CqrsSampleModule.cs)
  • redundant comment (src/sdk/Event/Event.cs)

New (1)

  • Documentation: no build, run or usage example (README.md)

API surface

  • Unchanged — 3 HTTP endpoints

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

microsoft/CQRS.Mediatr.Lite was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 8 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 23343c786072a54fa824319d02663b328cd2ae3a — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-45ab2cab63de.