You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've come here from your presentation of "Vertical Slice Architecture" at NDC Sydney.
I've noticed that all the codes strictly related to accomplishing a specific request are in the same folder/file.
For example all the code related to Create student is into Create.cshtml.cs file, that contains:
user interface specification,
command model,
command validator,
command handler,
command mapper to an entity.
I was wondering about "What about if I want to create a WebApi/Blazor/(another user interface) entry point with the same request? Do I have to 'copy and paste' the code inside the Create.cshtml.cs file or can I take out this logic and create a common endpoint?"
The text was updated successfully, but these errors were encountered:
In that case, you'd handle the duplication as you would anything else inside handlers. You don't want to re-use requests and handlers, though. There might be subtle differences that you can't predict between an API and Razor Page.
I've come here from your presentation of "Vertical Slice Architecture" at NDC Sydney.
I've noticed that all the codes strictly related to accomplishing a specific request are in the same folder/file.
For example all the code related to
Create student
is into Create.cshtml.cs file, that contains:I was wondering about "What about if I want to create a WebApi/Blazor/(another user interface) entry point with the same request? Do I have to 'copy and paste' the code inside the Create.cshtml.cs file or can I take out this logic and create a common endpoint?"
The text was updated successfully, but these errors were encountered: