The project follows Vertical Slice Architecture using MediatR, FluentValidation, AutoMapper, Scrutor, and ForEvolve.ExceptionMapper. It implements multiple basic operation experiments of a .Net 5 API working with MongoDB, including various ways of partially updating documents.
Example of supported operations:
- Create a document
- Read documents
- Replace a document
- Delete a document
- Partially update documents
Open the solution in Visual Studio and run the project (F5). You will need Docker installed. You can also use docker-compose directly.
You can use the tool of your choice to query the Web API endpoints or use Postman.
I deployed my Postman collection there: https://documenter.getpostman.com/view/1175921/T17FCowi?version=latest
Mongo is installed as a container side-by-side with the project itself. See the docker-compose.yml
and .env
files for more info.
Side note: don't publish your secrets to git as I did in this repo (the
.env
file).
If you want to contribute ideas, use cases, refactoring, implementations, or whatnot, please start by opening an issue.