2 Your first application
This chapter covers
- Creating a Razor Pages application
- Adding your first page
- Exploring the project files and the roles they play
- Configuring the application pipeline with middleware
In the last chapter, you learned that the Razor Pages framework is a web development framework and how, as part of ASP.NET Core, it fits within the overall .NET framework. You have discovered the types of applications that you can build with Razor Pages, and also importantly when it is not the best solution to use. You have been introduced to the tools that you need to be productive with Razor Pages, and hopefully downloaded and installed Visual Studio or VS Code. along with the latest version of the .NET SDK. Now that you have your development environment set up, it’s time to start working with code.
In this chapter, you will create your first Razor Pages application. I will show you how to do that using both Visual Studio and the CLI, so that you can follow along on the operating system of your choice. Most web development frameworks provide a starter kit or project - a simple application that forms the starting point for your own application. Razor Pages is no different. The application that forms the starter kit only has three pages, but it includes a basic configuration that you can build on to create your own more complex application.