StarterAspMVCEditorTemplates.ScaffoldTool
0.7.0
dotnet tool install --global StarterAspMVCEditorTemplates.ScaffoldTool --version 0.7.0
dotnet new tool-manifest
dotnet tool install --local StarterAspMVCEditorTemplates.ScaffoldTool --version 0.7.0
#tool dotnet:?package=StarterAspMVCEditorTemplates.ScaffoldTool&version=0.7.0
nuke :add-package StarterAspMVCEditorTemplates.ScaffoldTool --version 0.7.0
StarterAspMVCEditorTemplates.ScaffoldTool
CRUD generation for ASP.NET Core MVC projects built on StarterAspMVCEditorTemplates.
This tool only makes sense in a project that has those editor templates. It
deliberately emits almost no presentation of its own: no <input> tags, no
hardcoded CSS classes. It produces annotated ViewModels and explicit
Html.EditorFor calls, and lets Views/Shared/EditorTemplates do the rendering.
Point it at a project without them and every property falls back to MVC's
built-in defaults, which is not what you want.
Install
dotnet tool install --global StarterAspMVCEditorTemplates.ScaffoldTool
Use
Works like dotnet ef: change to the folder containing your .csproj.
cd src/MyApp
scaffold inspect # reads EF Core's model -> model.json
scaffold generate --dry-run
scaffold generate --force
inspect builds a throwaway probe project that references yours, so it reads
IModel using your EF Core version. Re-running merges: edits you made to
labels, search configuration, field order and additionalViewData survive a
migration, while schema facts are re-derived.
model.json is meant to be committed and edited. It is where you correct a
display column the conventions guessed wrong, translate labels, reorder fields,
or turn a search filter off.
What you get, per entity
ViewModels/{Entity}CreateModel.cs ViewModels/{Entity}SearchModel.cs
ViewModels/{Entity}EditModel.cs ViewModels/{Entity}IndexModel.cs
ViewModels/{Entity}ListItemModel.cs Controllers/{Route}Controller.cs
ViewModels/{Entity}DetailsModel.cs
Views/{Route}/Index Create Edit Details Delete .cshtml
- Index searchable by property, sortable, paged — rendered on the templates you
already have, with no additions to
EditorTemplates - Async action names throughout
- Foreign keys as
Dropdown, with generated select-list providers - Many-to-many as
CheckboxList, reconciled on save rather than cleared - Composite keys, explicit join entities, natural keys
- Optimistic concurrency when a
RowVersionexists, and only then - Cascade delete warnings that state how many rows go with it
Commands
scaffold inspect |
read the EF model into model.json |
scaffold generate |
render files; --dry-run, --force, --entity |
scaffold doctor |
which binary is running and what shipped in it |
scaffold eject-rules |
copy the naming conventions out to edit |
scaffold eject-templates |
copy the Scriban templates out to edit |
An ejected template always wins over the built-in one, so house style is a file edit rather than a fork.
Requirements
- .NET 10 SDK
- EF Core, with the project in a buildable state (
inspectbuilds it) Views/Shared/EditorTemplatesfrom StarterAspMVCEditorTemplates
Known gaps
Owned types are flattened to scalars unless mapped explicitly. Collection navigations are Details-only, with no inline add and remove. Many-to-many is neither searchable nor a grid column. Large lookup tables always render as a dropdown regardless of row count.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.7.0 | 118 | 8/24/2026 |