This is a project template I have found suitable for my dotnet projects I intend for it to help save time on project especially coding challenges when interviewing
Do a find for BezTemp
and replace with <your project name>
Also, remember to replace or delete the Sample implementations, they are only pointers to guide the way
@@ Please modify to suit your need @@
With clean architecture in mind, injecting different parts to achieve the workflow.
This approach spells easy maintainence
from the get-go(loosely coupled parts),
- Approach with response messages
- the service layer does the heavy lifting for this project and responses.
code
in theServiceResponse
class is to enable in-house team member tell right away what an issue is, this helps in resolving customer related issues, trust me, LOL.
- the service layer does the heavy lifting for this project and responses.
- C# .NET5
- Postgres
- Docker
- ORM - Entity Framework
- Automapper
- Testing - xunit
- service layer
- tests for service
- endpoints
- integration tests for endpoints
- dockerize app
- setup github workflows for CI
-
configure connection strings in
appsettings.json
in API project andtest.json
in Test project -
navigate to
BezTemp.API
rundotnet run
-
using docker
-
db configuration in
docker-compose.yml
and/ordockerfile
should correspond with connection string below -
connection string should look like:
"Host=db;Port=5432;Database=<dbname>;Username=<username>;Password=<password>"
-
Ensure
docker
anddocker-compose
is installed -
run
docker-compose up
- Unit testing
- Ensure
test.json
is configured appropriately - Navigate to
BezTemp.Tests
rundotnet test
- Ensure
- Integration
Kindly send me a dm on twitter @talabiope on how to improve this template. Looking forward to it!