From a finding to a practical fix.
Explore an example review of a .NET order-processing service: what needs attention, why it matters, and how to improve it.
Synthetic repository, findings and scores for illustration. This is not a customer scan or a live analysis. Available features depend on your workspace policy.
Commerce service
An order-processing API with shared domain, application and infrastructure layers.
- Repository
zenvera.commerce· example- Stack
- C# · .NET 10 · ASP.NET Core
- Scope
- Full repository · main branch
- Size
- 6 projects · 184 code files · 72 test files
- EA standard
- Zenvera EA · 1.0-structure.1
- Rule profile
- Standard
The EA standard defines structural conventions. The rule profile determines the checks included in the review.
A useful starting point
What is behind this score?
The most urgent issue is a dependency pointing out of the domain layer. Error handling and maintainability findings add follow-up work.
This example score is curated, not calculated from the three highlights below. Real reports expose the scoring breakdown for the recorded run and its rule configuration. A score alone does not establish release readiness.
Three highlights from seven findings
Expand a finding to see the source evidence and a practical response. Paths, snippets and line numbers are illustrative.
Error Domain depends on Infrastructure
Evidence: src/Core/Zenvera.Commerce.Core.Domain/Zenvera.Commerce.Core.Domain.csproj, line 18
<ProjectReference Include="..\Zenvera.Commerce.Core.Infrastructure\Zenvera.Commerce.Core.Infrastructure.csproj" />
Why it matters: Business rules now depend on persistence details. Database changes can ripple into the domain and make isolated tests harder to write.
Suggested fix: Remove the Infrastructure reference. Keep business abstractions in the appropriate inner layer and implement persistence in Infrastructure. Wire the implementation at the host composition root.
Verify: Build the domain without Infrastructure, run its tests, and rerun analysis to confirm that the dependency is gone.
Warning Centralize API error responses
Evidence: src/Api/Zenvera.Commerce.Api.RestHost/Program.cs, around line 42
app.MapControllers();
app.Run();
Why it matters: This example has no registered global exception handler in its startup path. Unexpected failures can produce inconsistent responses for API consumers.
Suggested fix: Register a central exception handler and consistent Problem Details responses before mapping endpoints. Keep sensitive exception details out of public responses.
Verify: An integration test should trigger an unexpected exception and check the status, response shape and absence of internal details. A shared error-handler registration can satisfy this requirement; do not add a second handler if one already exists.
Warning Reduce an oversized application service
Evidence: src/Core/Zenvera.Commerce.Core.Application/Orders/OrderService.cs, class starts at line 18; 620 lines in this example
Why it matters: Validation, order placement and notification coordination share one large service. Changes are harder to review and tests need broader setup.
Suggested fix: Extract responsibilities along existing use-case boundaries, starting with notification coordination. Keep the public behavior stable and avoid creating an interface for every small method.
Verify: Existing order-placement tests still pass, extracted behavior has focused tests, and a new analysis confirms the result against the configured maintainability threshold.
The remaining example findings comprise two warnings and two informational observations. A full report lists every finding; this public preview shows selected highlights.
See the boundary that needs attention
Turn the evidence into a review plan
Illustrative AI-style recommendation; no model was called to generate this preview.
Address the Domain-to-Infrastructure reference first. Inspect the types crossing that boundary, move the required abstraction inward, and keep its persistence implementation in Infrastructure. Rewire dependency injection at the API host, then verify order-placement behavior.
Suggested owner: Backend team
Acceptance: Domain builds without Infrastructure, order tests pass, and the next scan no longer reports the reference.
Treat AI advice as a review aid. Check it against source evidence and your team's conventions before changing code.
Make the improvement visible
Illustrative follow-up after fixing the domain reference, centralizing error handling and extracting notification coordination. Both runs use the same repository scope, profile and EA standard.
| Measure | Baseline | Follow-up |
|---|---|---|
| Quality score | 68 / 100 | 82 / 100 |
| Errors | 1 | 0 |
| Warnings | 4 | 2 |
| Informational | 2 | 2 |
| Total findings | 7 | 4 |
Review outcome: Three findings resolved; four remain for review. Use the actual delta report to distinguish resolved, new and unchanged findings rather than relying on the score alone.
What would your repository reveal?
Sign in to analyze a repository using your workspace's selected standard, or contact us for a guided walkthrough.