Solution structure - MarcosPiedra/CalculatorService GitHub Wiki
The solution structure are focused in a domain where the domain contains the business logic with the anemic models.
Are composed by the following projects:
CalculatorService.Configurations:
Contains all the configurations files (json) and the classes needed it for mapping the configuration.
CalculatorService.Console:
A simple client that is doing requests to the server. Does not use classes just static functions.
CalculatorService.CrossCutting:
Components and services that belong to the infrastructure.
CalculatorService.Domain:
Components, services and models of the domain. That contains:
- Models: Animic models.
- Operations: Calculation necessary for each operation. The operations are separated by classes.
Service for tracking and the repository.
CalculatorService.SqlDataAccess:
Definition of the db context and their configuration (mapping to the db separated by files)
CalculatorService.WebAPI:
Contains:
- Setup and configuration of the host used for MVC .net core.
- Controllers: Definition of the method of the service.
- DTOs: Used for the request and response.
- Mapping: Configurations of AutoMapper.
- Middleware: Pipeline to handle requests. There is a class for manage exceptions basically belongs in controllers.
- Validation: Rules configure with FluentValidation
CalculatorService.WebAPI.Tests.Integration:
Testing all the components together (focused in a feature).
CalculatorService.WebAPI.Tests.Unit:
Individual test for each component.