Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add use case templates (commands and queries) #881

Merged
merged 5 commits into from
Jun 29, 2023

Conversation

jasontaylordev
Copy link
Owner

Overview

Based on @Lanz86 contribution in #778, I've added a new item template ca-usecase. This template allows you to create new commands or queries from the command-line.

Changes Made

  • Created a new item template named ca-usecase, see ./templates
  • Supports scaffolding use cases as commands or queries
  • Includes scaffolding basic validation structures
  • Ability to specify the return type
  • Automatically create folder structure as FeatureName/<Commands|Queries>/UseCaseName

Example

Here's an example of how to use the new item template. Start within the ./src/Application/ folder and run the following command:

dotnet new ca-usecase --useCaseType command --name CreateTodoList --featureName TodoLists --returnType int

This will create a new use case of type command. To create a new query:

dotnet new ca-usecase -us query -n GetTodos -f TodoLists -r TodosVm

Please review the changes and provide your feedback. Thank you! ❤️

@jasontaylordev jasontaylordev marked this pull request as ready for review June 29, 2023 03:34
@jasontaylordev jasontaylordev force-pushed the Lanz86-778-Command_Item_Template branch from 0dde8ea to 223475d Compare June 29, 2023 06:20
@jasontaylordev jasontaylordev force-pushed the Lanz86-778-Command_Item_Template branch from 9cdf92f to 40e2c4a Compare June 29, 2023 06:29
@jasontaylordev jasontaylordev merged commit 0dcb1b6 into main Jun 29, 2023
2 checks passed
@jasontaylordev jasontaylordev deleted the Lanz86-778-Command_Item_Template branch June 29, 2023 06:32
This was referenced Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants