Hona.VerticalSliceArchitecture.Template
0.7.1
See the version list below for details.
dotnet new install Hona.VerticalSliceArchitecture.Template::0.7.1
🤔 What is it?
A small but opinionated Vertical Slice Architecture solution template for .NET 8
Learn
🎉 Getting Started
To install the template from NuGet.org run the following command:
dotnet new install Hona.VerticalSliceArchitecture.Template
Then create a new solution:
mkdir Sprout
cd Sprout
dotnet new hona-vsa
Finally, to update the template to the latest version run:
dotnet new update
📚 Faster Development
To speed up development there is a dotnet new
template to create a full Vertical Slice.
dotnet new hona-vsa-slice -f Student
-f
or --feature
where the feature name is the singular name of the feature.
Of course, there are always exceptions where appending an 's' is not enough. For example, Person
becomes People
and Child
becomes Children
.
For this, use the optional parameter:
dotnet new hona-vsa-slice -f Person -fp People
optional: -fp
or --feature-plural
where the feature name is the plural name of the feature.
This creates everything you need to get started with a new feature.
- Full CRUD endpoints
- CQRS
- missing
EventHandlers/
folder as this is more uncommon - provides
Events/
as a folder to demonstrate how to trigger side effects
- missing
- Basic REPR pattern (i.e., Request, an Endpoint, and a Response)
- Adds a new Entity
- Basic DDD pattern - the 'Complete' method on the entity shows adding Domain events and using
Result
objects instead of exceptions for validation - Adds a DbSet to the DbContext
- Adds EF Core Entity Type Configuration
- Adds a Repository
While there is a small amount of code to remove, it is better to push you towards the pit of success, than allow inconsistency.
📝 Architecture
graph TD;
subgraph ASP.NET Core Web App
subgraph Slices
A[Feature A]
B[Feature B]
end
Slices --> |depends on| Common
Host --> |depends on| Common
Host --> |depends on| Slices
ASPNETCore[ASP.NET Core] --> |uses| Host
end
Common[Common]
✨ Features
- C# 12
- .NET 8
- ASP.NET Core
- Minimal APIs
- EF Core
- Swagger UI
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.0.0-rc6 | 125 | 10/3/2024 |
2.0.0-rc5 | 83 | 7/30/2024 |
2.0.0-rc4 | 52 | 7/30/2024 |
2.0.0-rc3 | 40 | 7/30/2024 |
2.0.0-rc2 | 49 | 7/30/2024 |
2.0.0-rc1 | 55 | 7/30/2024 |
2.0.0-beta1 | 55 | 7/30/2024 |
2.0.0-alpha1 | 87 | 7/22/2024 |
0.8.0 | 619 | 3/23/2024 |
0.7.4 | 229 | 3/20/2024 |
0.7.3 | 180 | 3/20/2024 |
0.7.2 | 167 | 3/20/2024 |
0.7.1 | 128 | 3/20/2024 |
0.7.0 | 188 | 3/20/2024 |
0.6.0 | 291 | 3/14/2024 |
0.5.3 | 2,487 | 12/22/2023 |
0.5.2 | 219 | 12/22/2023 |
0.5.1 | 195 | 12/22/2023 |
0.5.0 | 189 | 12/22/2023 |
0.4.0 | 231 | 12/21/2023 |
0.3.0 | 1,359 | 11/15/2023 |
0.2.1 | 986 | 10/22/2023 |
0.2.0 | 334 | 10/22/2023 |
0.1.4 | 314 | 9/20/2023 |
0.1.3 | 289 | 9/20/2023 |
0.1.2 | 320 | 9/20/2023 |
0.1.1 | 297 | 9/20/2023 |
♻️ Switch back to IReadOnlyList & ToListAsync (#38)
✨ Add config to configure services (#37)
🗑️ Drop OpenAPI convenience extensions (#36)
♻️ Rename Module to Feature (#35)
👷🏻 Automatically create GitHub release after nuspec version change (#34)