This is a powershell script to build a DotNet Solution Template. To use this template execute the following command.
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
./solution.ps1 -Name <Name> -Framework <FRAMEWORK> -Database <Database Name>
The Default values are:
<Name> = Template<Framework> = net7.0<Entity> = true<Database> = mssql
-Framework <FRAMEWORK>
Specifies the framework to target. Option not available in .NET Core 2.2 SDK.
The following table lists the default values according to the SDK version number you're using:
| SDK version | Default value |
|---|---|
| 7.0 | net7.0 |
| 6.0 | net6.0 |
| 5.0 | net5.0 |
| 3.1 | netcoreapp3.1 |
execute dotnet --list-sdks to know wich sdk is installed on yur machine
set <Entity> = false, if you don't want to install Entity Framework and Entity FrameWork Provider.
| Database Name | Nuget Url |
|---|---|
| mssql | Microsoft sql server |
| sqlite | SqLite |
| npgsql | PostgreSQL |
| mysql | MySql |
| oracle | Oracle |
| pomelo | Pomelo |
any other database provider sould be instaled separeted, also are instaled
| Package Name | Nuget url |
|---|---|
| Entity Framework Tools | dotnet-ef |
| Entity Framework Core | EntityFrameworkCore |
The Following Architeture will be created.
-
WebApi
Main part of the Project
- Controllers
- Static Configuration Files
- Build Files
-
CrossCutting
Responsable for configuration, security, logging and Authentication/Autorization connection with SSO service, if necessary
-
ApplicationCore
Responsable for the bussines logic
-
Infraestructure
Resposable for external connection logic such as
- Database logic
- Http client logic (external services)
-
Domain
Definition project.
- Entities, DTOs
- Exceptions
- Constants
- Interfaces
- Validation