This project acts as a dotnet cli custom template when using dotnet new
. This will scaffold a new microservice with the following features:
Feature |
---|
.NET Core 3.1 |
Clean Architecture |
CQRS |
Docker File |
Requirement |
---|
.NET Core 3.1 SDK |
- Clone this repo
- Install the template to your sdk
dotnet new -i <PATH TO REPO>
. This will create a new template for you to use:cqrs-ms
.
dotnet new -u
- This will produce output that looks like
... Templates: CQRS Microservice (cqrs-ms) C# Uninstall Command: dotnet new -u C:\dev\cqrs-ms ...
- Run the uninstall command for the
cqrs-ms
template
When upgrading, it is best practice to uninstall the template and then re-install after you have pulled the latest
Parameter | Description |
---|---|
projectName -P |
Standard project name for the template. Used as prefix for all files and namespaces eg (ProjectName.Api ) |
repoName -r |
The name of the repository. In most cases will be the same value as Output |
output -o |
The output directory. Defaults to the current directory. In most cases will be the same value as repoName |
If -o
is not supplied the project will be created in the current working directory
In most cases repoName (-r)
and output (-o)
will be the same. Due to the cli they needed to be different parameters
dotnet new cqrs-ms -P <PROJECT NAME> -R <REPO NAME>