This project was created to practice software development techniques and also the use of framworks and tools.
./
├── ci -> configuration files for pipelines
├── src -> source code from the application
├── tools -> tools to aid development, such as docker compose
├── .gitattributes
├── .gitignore
└── README.md
- Service
- Factory
- Builder
- Singleton
- Repository
- Dependency Injection
- CQRS
- Mediator
Dependency | Version |
---|---|
.Net Core | 6.0 |
EntityFrameworkCore | 5.0.7 |
MediatR | 10.0.1 |
Newtonsof | 13.0.1 |
Swagger | 6.4.0 |
AutoMapper | 10.1.1 |
FluentAssertions | 11.2.0 |
MSTest | 2.2.3 |
NSubstitute | 4.2.2 |
Docker | 20.10.8 |
Serilog.AspNetCore | 6.0.1 |
Serilog.Sinks.Console | 4.0.1 |
Serilog.Sinks.Seq | 5.1.1 |
AspNetCore.HealthChecks.SqlServer | 5.0.3 |
Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore | 5.0.10 |
Project | Application Layer |
---|---|
AdventureWorks.Person.Api | API Rest responsible for communicating with external services. |
AdventureWorks.Person.Domain | layer that contains all business rules of the 'Person' domain. |
AdventureWorks.Person.Domain.Tests | Unit tests from the domain layer. |
AdventureWorks.Person.Infrastructure | layer responsible for abstracting all resources that the domain will need to use. |
In this project we will test the workflow using git flow
with the style of karma commits.
In this section, all dependencies that the project has for its functioning will be listed.
Was chosen to use a microsoft example database, adventureworks which can be downloaded from this link. To facilitate the process, a docker image was created that contains this database: adventureworks-sqlserver-database
The application has using Serilog and Seq to log, for to view logs access http://localhost:5341/
For more informations read:
This application uses Health Checks to verify the application's health and dependencies.
http://localhost/health
: for check with dependencieshttp://localhost/health/ready
: for the readiness check. The readiness check filters health checks to the health check with the ready tag.http://localhost/health/live
: for the liveness check. The liveness check filters out the StartupHostedServiceHealthCheck by returning false in the HealthCheckOptions.Predicate (for more information, see Filter health checks)
git clone https://github.com/igortessaro/adventureworks-person.git
Execute these commands into PowerShell:
dotnet dev-certs https --clean
dotnet dev-certs https -ep $env:USERPROFILE\.aspnet\https\aspnetapp.pfx -p Pa1153w0rd
dotnet dev-certs https --trust
Make sure you are in the tools/docker
folder to run the command below
docker compose up -d --build