AKlaus/DomainResult
47.6
Weak · 21 September 2026
3k
lines of production code
C#
primary language
4
measurements over time
What this system is
DomainResult is a .NET library that standardizes domain error handling by mapping specific HTTP status codes and problem details to domain operation outcomes. It provides extension methods to convert domain results into ASP.NET Core MVC ActionResults and Minimal API IResults, enabling consistent API responses. The system includes helper classes for URL generation and exception handling, supported by comprehensive unit tests and sample applications demonstrating various HTTP status code mappings.
How it got here
2020 — Initial project scaffolding and domain result implementation
11 changes.
This period marks the initial creation of the DomainResult library, establishing the core DomainResult and DomainOperationStatus abstractions for structured error handling. The work included setting up the solution structure, implementing MVC conventions and helpers, and providing comprehensive test coverage and sample applications to demonstrate usage.
2022–2024 — HTTP status code mapping and API samples
6 changes.
This period focused on expanding the library's support for mapping domain results to specific HTTP status codes across both Minimal APIs and MVC controllers. New extension methods and sample applications were introduced to demonstrate handling various success and error responses, including comprehensive Swagger configuration for API documentation.
Features
Add minimal Web API sample with comprehensive HTTP status code examples
A new sample application for the WebApiMinimal project has been added, demonstrating how to return various HTTP status codes including 200, 201, 204, 400, 403, 404, 409, 413 (Content Too Large), and 503. The sample includes configuration for Swagger and developer exception pages, providing a complete example of handling different HTTP responses in a minimal API setup.
samples/WebApiMinimal · high confidence
Added IResult conversion extensions for Minimal APIs
New extension methods have been added to the MVC project to convert domain results into IResult types for use with Minimal APIs. These methods, including ToResult and ToCustomResult, support HTTP 200, 204, and custom status codes, utilizing Microsoft.AspNetCore.Http.TypedResults for improved type safety and compile-time checking, which is available since .NET 7.
src/Mvc/IResult · high confidence
Added Swagger configuration for the sample Web API
A new file, AddAndConfigureSwagger.cs, has been added to the samples/WebApi/Configuration directory. This change introduces the configuration for Swagger/OpenAPI, enabling the sample API to expose its documentation and UI. The implementation includes methods to add Swagger generation with version 'v1' and to configure the Swagger UI, allowing users to interact with the API's documentation.
samples/WebApi/Configuration · high confidence
Added Swagger/OpenAPI configuration for the Minimal API sample
The sample application now includes a dedicated configuration file that registers and configures Swagger (OpenAPI) support. This adds the necessary services for API documentation and UI, allowing users to view and interact with the API's OpenAPI specification.
samples/WebApiMinimal/Configuration · high confidence
Added sample services for domain result types
Added new sample service classes in the Domain folder to demonstrate the usage of various domain result types, including Conflict, ContentTooLarge, CriticalUnavailable, Failed, NotFound, Success, and Unauthorized. Each service provides synchronous, asynchronous, and tuple-returning methods to show how to construct and return these specific HTTP status codes and domain states.
samples/Domain · high confidence
Expanded minimal API route samples for HTTP status codes
Added new route handler samples for HTTP 200, 201, and 204 success responses, as well as 400, 403, 404, 409, 413, and 503 error responses. These files demonstrate how the library maps domain results to specific HTTP status codes and problem details, providing concrete examples for developers using the minimal API template.
samples/WebApiMinimal/Routes · high confidence
Expanded sample API with new HTTP status code examples
The sample Web API controllers have been expanded to include new examples for handling various HTTP status codes. This includes adding support for 413 Content Too Large (formerly Payload Too Large), 409 Conflict, and 503 Service Unavailable responses. Additionally, the samples now demonstrate the use of \IActionResult\ and \ActionResult\<T\>\ return types, providing more comprehensive guidance on mapping domain results to specific HTTP responses.
samples/WebApi/Controllers · high confidence
Initial project scaffolding and configuration
Added the foundational project structure for the DomainResult library, including the solution file (DomainResult.sln) that organizes the DomainResult.Common, DomainResult.Mvc, and sample projects. Included a Directory.Build.props file to enforce C\# language features (nullable, implicit usings) and global metadata (author, copyright). Added an .editorconfig file to standardize C\# coding conventions, indentation, and formatting rules across the repository.
(repo-wide) · high confidence
Introduce DomainResult and DomainOperationStatus for structured domain error handling
The \src/Common\ area now provides a new \DomainOperationStatus\ enum and \DomainResult\/\DomainResult\<T\>\ classes that map domain operation outcomes to specific HTTP status codes (e.g., 404, 409, 413, 503). This introduces a standardized way to represent success, not found, unauthorized, conflict, content too large, failed, and critical dependency error states, along with extension methods for async tasks and type conversions.
src/Common · high confidence
New HttpCodeConvention for configuring HTTP status codes and titles
The MVC project introduces a new HttpCodeConvention class that allows users to configure the HTTP status codes and problem details titles returned for various domain operation statuses, including a new ContentTooLarge (413) case. This provides a centralized way to customize error responses in the MVC layer.
src/Mvc · medium confidence
New exception-throwing extension methods for DomainResult
A new exception type, DomainResultException, has been introduced alongside extension methods that allow developers to throw this exception when a DomainResult indicates failure. This provides a more concise way to handle error states by automatically throwing an exception if the result is not successful, rather than requiring explicit checks and manual exception throwing.
src/Common/Exceptions · high confidence
New extension methods for converting domain results to ASP.NET Core MVC action results
The \DomainResults.Mvc\ package now provides a comprehensive set of extension methods to convert domain results into standard ASP.NET Core MVC \IActionResult\ and \ActionResult\<T\>\ types. This includes dedicated helpers for 200 OK, 204 No Content, and custom action results, allowing developers to easily map domain operations to HTTP responses with proper error handling via \ProblemDetails\. The implementation supports both synchronous and asynchronous domain result tasks, streamlining the integration of domain-driven design patterns into web API controllers.
src/Mvc/ActionResult · high confidence
New helpers for generating controller action URLs
Added GenericUrlActionHelper and InternalExpressionHelper to provide strongly-typed methods for generating URLs for controller actions. This introduces new capabilities for URL generation, specifically supporting HTTP route URLs and action URL generation with route value extraction from expressions.
src/Mvc/Helpers · high confidence
Behavioural changes
Initial WebApi sample project structure
The WebApi sample has been restructured to use the modern .NET generic host model. Program.cs now defines the entry point using Host.CreateDefaultBuilder and ConfigureWebHostDefaults, while Startup.cs handles service configuration and middleware setup, including controllers and Swagger. Configuration is managed via appsettings.json and appsettings.Development.json files, providing a clear separation of concerns for the sample application.
samples/WebApi · high confidence
Test coverage
Added comprehensive test coverage for MVC result conversions; Added tests for IDomainResult conversion, tuple, and exception-throwing extensions.
Dependencies
Updated test and sample project dependencies and targets
The test project now targets .NET 7, 8, 9, and 10, with corresponding updates to xUnit, xUnit runner, and Microsoft.NET.Test.Sdk. The DomainResults.Mvc library has been updated to target .NET 7, 8, 9, and 10. Sample projects have been added or updated to reference the latest versions of Swashbuckle.AspNetCore (10.1.0) and NSwag.AspNetCore (14.6.3).
(dependencies) · medium confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 48 → 48 (-0.5)
- Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 86 → 86 (-0.0)
- Architecture 93 → 93 (+0.0)
- Maturity 50 → 47 (-3.4)
- Readiness 38 → 34 (-4.2)
- Security 52 → 74 (+22.6)
- Performance 60 → 60 (+0.0)
Resolved (17)
- Bounded contexts not declared
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- LLM evaluation failed
- No exposed public API
- Off-boarding risk: anonymized user #1
- The README is a single page with no architecture or design documentation for the DomainResult pattern itself (e.g. why it replaces ActionResult/IResult, what failure-handling semantics are enforced). (README.md)
New (33)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Duplicated block (13 lines × 2) (src/Mvc/ActionResult/DomainResultToActionResult.cs)
- High secret: WD-SECRET-0001 (DomainResult.snk)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- Inconsistent naming between synchronous (Conflict) and asynchronous (ConflictTask) variants.
- Inconsistent naming between synchronous (ContentTooLarge) and asynchronous (ContentTooLargeTask) variants.
- …and 13 more
API surface
- Unchanged — 159 HTTP endpoints
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
AKlaus/DomainResult 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 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 7ae9c56c1df8487d33f303f265c9422482f4d62d — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-28e75b8e3254.