2017-08-29 07:54:12 +08:00
|
|
|
<a name="scaffold"></a>
|
2019-03-20 04:18:13 +08:00
|
|
|
|
2017-08-29 07:54:12 +08:00
|
|
|
### Scaffold the Movie model
|
|
|
|
|
2018-01-20 02:21:16 +08:00
|
|
|
* Run the following from the command line (in the project directory that contains the *Program.cs*, *Startup.cs*, and *.csproj* files):
|
2017-08-29 07:54:12 +08:00
|
|
|
|
2019-09-18 05:01:04 +08:00
|
|
|
```dotnetcli
|
2017-08-29 07:54:12 +08:00
|
|
|
dotnet aspnet-codegenerator razorpage -m Movie -dc MovieContext -udl -outDir Pages/Movies --referenceScriptLibraries
|
2017-11-16 06:03:32 +08:00
|
|
|
```
|
2018-01-20 02:21:16 +08:00
|
|
|
|
2017-11-16 06:03:32 +08:00
|
|
|
If you get the error:
|
2019-03-20 23:32:05 +08:00
|
|
|
|
2017-11-16 06:03:32 +08:00
|
|
|
```
|
2019-03-20 23:32:05 +08:00
|
|
|
No executable found matching command "dotnet-aspnet-codegenerator"
|
2017-11-16 06:03:32 +08:00
|
|
|
```
|
|
|
|
|
2018-01-20 02:21:16 +08:00
|
|
|
Open a command shell to the project directory (The directory that contains the *Program.cs*, *Startup.cs*, and *.csproj* files).
|