dotnet / dotnet/Scaffolding

Allow controller generation to include areas

Open
#2,537 1 comment 0 reactions 0 assignees View on GitHub
area-scaffolding customer-reported type-enhancement
Dominant language
C#
Stars
818
Forks
260
Avg merge
1d 8h
Merged PRs (30d)
10

Description

I'm trying to scaffold a controller in an area ie:

```
dotnet aspnet-codegenerator controller -m Order -dc DbContext -udl --referenceScriptLibraries --useDefaultLayout -outDir Areas/Admin/Controllers --controllerName OrdersController
```

It would be nice if I can pass an explicit `--area` or `-a` flag so that it will generate controllers (and related views) with the specified area (In this case "Admin"). This is important, because the default anchor tag helper doesn't reuse the current area, so if I generate and try to move to it to an area, I have to manually edit all the files and add in `

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.