2024-05-09 22:03:05 -04:00
2024-03-17 21:02:41 -04:00
2024-07-22 00:31:01 -04:00

Hutopy

Patterns / strategy used

Tools

Database setup in docker for local dev

docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=<YourPassword>" -p 1433:1433 -d mcr.microsoft.com/mssql/server:2022-latest

Or with a mounted volume to persist data on the computer instead ( persist data even if the container is deleted )

docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=<YourPassword>' -p 1433:1433 -v C:\dev\DockerVolumes\SqlServer-Utopy-1\data:/var/opt/mssql/data -v C:\dev\DockerVolumes\SqlServer-Utopy-1\log:/var/opt/mssql/log -v C:\dev\DockerVolumes\SqlServer-Utopy-1\secrets:/var/opt/mssql/secrets -d mcr.microsoft.com/mssql/server:2022-latest

Entity Framework

Create a new migration :

./Ef.ps1 migrations add NomDeLaMigration

Update database :

./Ef.ps1 database update

Secret Manager tool

Go to Web project: cd src/Web

Add a user secret for local development :

dotnet user-secrets set "DB_PASSWORD" "12345"

list your stored secrets :

dotnet user-secrets list

Delete a secret :

dotnet user-secrets remove "DB_PASSWORD"

Build

Run dotnet build -tl to build the solution.

Run

To run the web application:

cd .\src\Web\
dotnet watch run

Navigate to https://localhost:5001. The application will automatically reload if you change any of the source files.

Code Styles & Formatting

The template includes EditorConfig support to help maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The .editorconfig file defines the coding styles applicable to this solution.

Code Scaffolding

Scaffold new commands and queries.

Start in the .\src\Application\ folder.

Create a new command:

dotnet new ca-usecase --name CreateTodoList --feature-name TodoLists --usecase-type command --return-type int

Create a new query:

dotnet new ca-usecase -n GetTodos -fn TodoLists -ut query -rt TodosVm

If you encounter the error "No templates or subcommands found matching: 'ca-usecase'.", install the template and try again:

dotnet new install Clean.Architecture.Solution.Template::8.0.4

Test

The solution contains unit, integration, and functional tests.

  • Using Moq, Nunit, Respawn, FluentAssertions

To run the tests:

dotnet test
Description
No description provided
Readme 141 MiB
Languages
C# 45.6%
Vue 44.8%
JavaScript 8.9%
CSS 0.3%
Shell 0.3%