AspNetCore.Docs/aspnetcore/includes/RP/model4x.md

588 B

Scaffold the Movie model

  • Open a command window in the project directory (The directory that contains the Program.cs, Startup.cs, and .csproj files).

  • Run the following command:

    dotnet aspnet-codegenerator razorpage -m Movie -dc MovieContext -udl -outDir Pages/Movies --referenceScriptLibraries
    

If you get the error:

No executable found matching command "dotnet-aspnet-codegenerator"

Open a command window in the project directory (The directory that contains the Program.cs, Startup.cs, and .csproj files).