This is a sample application to be an example of using Clean Architecture alongside .net 6's Minimal APIs.
- Logging using Serilog
- Mediator Pattern using Mediatr
- Validation using FluentValidation
- Testing using Shouldly and NSubstitute
- OpenApi using Swashbuckle
There's a dockerfile included in the build folder and serves the purpose of restoring, building, testing, publishing and then creating a runtime image of the API. Works on my machine.....
docker build -f ./build/Dockerfile -t minapi:latest .
This solution depends on the pre-release SDK for .net 6, you need to install that before it will work for you.
This solution contains a few projects to follow the Clean Architecture patterns, it's by no means perfect. But it's an example so cut me some slack. Each project has a purpose and is separated from the others, for a far more well thought out solution please see Jason Taylor's Clean Architecture Template
This sample would not have been possible without gaining inspiration from the following resources. If you are on your own learning adventure please read the following blogs and documentation.