Skip to content

Architecture Guide

Casey edited this page Apr 6, 2025 · 5 revisions

EntityAxis is designed to work well in layered, modular systems by providing abstractions for command and query operations, validation, mapping, and integration with MediatR and EF Core.

While EntityAxis works especially well within Clean Architecture, it doesn't force a specific structure. You can integrate it into any architecture where you want consistent, testable handling of CRUD operations.

Design Philosophy

EntityAxis follows these key design principles:

  • Separation of Concerns: Keeps command/query logic isolated from data access, validation, and mapping.
  • Convention Over Configuration: Enables automatic registration of services and handlers using patterns.
  • Explicit Interfaces: Encourages the use of generic abstractions for predictable, consistent APIs.
  • Composable Services: Use only the layers you need (e.g., use MediatR without EF Core, or use validation without commands).
  • Testability: All components are easily mockable and testable with minimal setup.

Typical Integration Layers

EntityAxis is composed of multiple NuGet packages. These packages are designed to plug into your layers based on responsibilities:

Package Typical Layer Purpose
EntityAxis.Abstractions Core / Domain Base interfaces and contracts
EntityAxis.MediatR Application Handlers, commands, validators
EntityAxis.MediatR.Registration Infrastructure Fluent registration of MediatR handlers
EntityAxis.EntityFramework Infrastructure EF Core-based command/query services
EntityAxis.Registration Infrastructure Fluent DI registration for services

ℹ️ Note: If you're consuming multiple EntityAxis packages, make sure you're using the same version of all packages. They reference each other directly and may not be compatible across mismatched versions.


📚 See Also

Clone this wiki locally