GenerateVerticalSliceArchitecture 2.1.3
dotnet tool install --global GenerateVerticalSliceArchitecture --version 2.1.3
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local GenerateVerticalSliceArchitecture --version 2.1.3
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=GenerateVerticalSliceArchitecture&version=2.1.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package GenerateVerticalSliceArchitecture --version 2.1.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
🧠 Ferramenta CLI Generate Vertical Slice Architecture
Generate Vertical Slice Architecture é uma biblioteca leve e moderna que cria estrutura a Feature da arquitetura Vertical Slice.
🚀 Por que Generate Vertical Slice Architecture?
- ✅ Utilizamos a biblioteca MinDiator como dependência
- 🧱 Pensado para CQRS – separa Endpoints, Commands e Queries
- 🧩 Ideal para Vertical Slice Architecture – organização de features por funcionalidade
- 🧰 Fácil de executar
📦 Instalação Global
dotnet tool install --global GenerateVerticalSliceArchitecture --version 1.0.0
📦 Instalação Local
dotnet tool install --local GenerateVerticalSliceArchitecture --version 1.0.0
1. Navegue até a pasta que tem o csproject:
exemplo:
cd c:\..\..\WebApi
2. Execure o comando
Como usar:
gvsa MeuVerticalSliceArchitecture
2. Exemplo simples
public record struct MeuVerticalSliceArchitectureCommand(string props) : IRequest<Guid>;
public class MeuVerticalSliceArchitectureCommandHandler : IRequestHandler<MeuVerticalSliceArchitectureCommand, Guid>
{
public async Task<Guid> Handle(MeuVerticalSliceArchitectureCommand request, CancellationToken cancellationToken = default)
{
throw;
}
}
📁 Exemplo de organização com Vertical Slice
Features/
└── Usuarios/
├── Commands/
│ ├── CreateUsuarioCommandHandler.cs
│ ├── UpdateUsuarioCommandHandler.cs
│ └── DeleteUsuarioCommandHandler.cs
├── Endpoints/
│ ├── UsuarioEndpoint.cs
└── Queries/
├── GetUsuarioByIdQuery.cs
├── GetUsuarioListQuery.cs
✅ Roadmap
- Criação do VSA generica no ASP.NET Core
- Criação do VSA com FluentResult no ASP.NET Core
- Criação do VSA com FluentResult com EF
- Criar context
- Criar repository
- Injetar repository no handler
- Criação do VSA com FluentResult com Dapper
- Criar context
- Criar repository
- Injetar repository no handler
🤝 Contribuições
Pull requests são super bem-vindos. Se quiser contribuir com uma ideia, melhoria ou bugfix, fique à vontade para abrir uma issue ou PR.
📄 Licença
MIT © danielfmpc
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.