This project is an example of a shopping list API, to show some software architectural concepts, mainly CQRS (Command and Query Responsibility Segregation).
The API is an ASP NET WebAPI using .NET 7, with as few external dependencies as possible.
The links are for studying and for knowledge reference.
- CQRS pattern (link1) (link2)
- Notifications pattern (link)
- Feature folders (link)
- Structured logging (link)
- Nullable and non-nullable reference types (link)
- Unit tests (link)
- API tests (link)
- Swagger documentation with examples (link)
The project requires only .NET 7 installed. The API uses an in-memory database, so no database is necessary. The API testing requires Postman.
The runserverlocal.ps1
script builds and runs the API, listening on http://localhost:5000
.
The rununittests.ps1
script runs the unit tests and generates a testing coverage report at a TestResults
folder. It requires the ReportGenerator installed.
To run the API tests, import the Postman collection and environment files located at the tests
folder, then start the collection runner (tutorial here).