How entelect-incubator/.net-template works
Main Components
a. API Layer (Common to all patterns):
• Controllers (PizzaController)
• Middleware components (LoggingMiddleware)
• Startup configuration
b. Core Business Logic Layer:
• For Layered Architecture:
• Commands/Queries
• Validation
• Business Logic
• Entity Framework Context
• For Clean Architecture:
• Application Layer (Use Cases)
• Domain Layer (Entities, Value Objects)
• Infrastructure Layer (Persistence)
• For Vertical Slice Architecture:
• Feature Modules (Pizza Feature)
• Cross-cutting Concerns
c. Cross-cutting Concerns:
• Logging
• Validation
• Error Handling
• Performance Monitoring
Relationships and Data Flow
• API requests flow from controllers to business logic
• Database operations flow through Entity Framework
• Cross-cutting concerns' interaction with other components
• Command/Query flow through MediatR
Specific Architectural Patterns
For Layered Architecture:
[API Layer]
• ↓
[Business Logic Layer]
• ↓
[Data Access Layer]
• ↓
[Database]
For Clean Architecture:
[API/UI Layer]
• ↓
[Application Layer]
• ↓
[Domain Layer]
• ↓
[Infrastructure Layer]
For Vertical Slice Architecture:
[API Endpoint] → [Feature Slice]
• ↓
• [Domain Logic]
• ↓
• [Data Access]
Important Elements to Highlight
• MediatR pipeline
• FluentValidation integration
• Entity Framework Core context
• Logging configuration
• Rate limiting
• Feature management
• API versioning (v1)
Technical Details
• .NET 9 framework
• Entity Framework Core 9
• MediatR for CQRS
• FluentValidation
• NSwag for API documentation
• Testing framework integration