Anatomy of an ASP.NET Web App
You'll begin this chapter by creating a new Razor Pages application with ASP.NET. It is just one of the various types of apps that can be created with ASP.NET but will be an effective starting point as it shares and showcases a lot of commonalities with other web application types that can be built with the framework.
- To create a new Razor Pages app, enter the following commands in the CLI:
dotnet new razor -n ToDoListApp dotnet new sln -n ToDoList dotnet sln add ./ToDoListApp
Here you are creating a to-do list application with Razor Pages. Once the preceding command is executed, you will see a folder with the following structure:
/ToDoListApp |-- /bin |-- /obj |-- /Pages |-- /Properties |-- /wwwroot |-- appsettings.json |-- appsettings.Development.json |-- Program.cs |-- ToDoListApp.csproj |ToDoList.sln
- Open the root folder in Visual Studio Code.
There are some files inside these folders that will be covered in...