dotnet / Scaffolding

Code generators to speed up development.
MIT License
638 stars 229 forks source link

Lowercase the model path segment for the Edit component of the CRUD set #2746

Closed guardrex closed 4 months ago

guardrex commented 4 months ago

In the file ...

https://github.com/dotnet/Scaffolding/blob/main/src/Scaffolding/VS.Web.CG.Mvc/Templates/Blazor/Edit.tt

... the model isn't lowercased to match what's done for the other components of the set ...

- @page "/<#= pluralModel #>/edit"
+ @page "/<#= pluralModelLowerInv #>/edit"

Because of it, the path comes out (for example using a movies database example) ...

@page "/Movies/edit"

... instead of the expected ...

@page "/movies/edit"
guardrex commented 4 months ago

Moved to https://github.com/dotnet/Scaffolding/issues/2743#issuecomment-2114992611.