Add pizza page to the app
Add a Pizza list page with a form
Change directory to RazorPagesPizza project directory if required and run the following .NET CLI command in the terminal:
dotnet new page --name Pizza --namespace RazorPagesPizza.Pages --output Pages
The preceding command:
Creates the following files in the
RazorPagesPizza.Pages
namespace:Pizza.cshtml—The Razor page
Pizza.cshtml.cs—The accompanying
PageModel
class
Stores both files in the project's Pages directory.
Last updated