-
-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture Guide
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.
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.
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.
- Getting Started — Quick steps to integrate EntityAxis.
- Command & Query Abstractions — Learn about the core service contracts.
- Entity Registration — How to register your services and handlers.
- EF Core Integration — For persistence implementation.
- MediatR Integration — For implementing handlers and validators.