3 Your first application

 

This chapter covers

  • Creating your first ASP.NET Core web application
  • Running your application
  • Understanding the components of your application

In the previous chapters, I gave you an overview of how ASP.NET Core applications work and when you should use them. Now you should set up a development environment to use for building applications.

Tip

See appendix A for guidance on installing the .NET 7 software development kit (SDK) and choosing an editor/integrated development environment (IDE) for building ASP.NET Core apps.

In this chapter, you’ll dive right in by creating your first web app. You’ll get to kick the tires and poke around a little to get a feel for how it works. In later chapters, I’ll show you how to go about customizing and building your own applications.

As you work through this chapter, you should begin to get a grasp of the various components that make up an ASP.NET Core application, as well as an understanding of the general application-building process. Most applications you create will start from a similar template, so it’s a good idea to get familiar with the setup as soon as possible.

Definition

A template provides the basic code required to build an application. You can use a template as the starting point for building your own apps.

3.1 A brief overview of an ASP.NET Core application

3.2 Creating your first ASP.NET Core application

3.2.1 Using a template to get started

3.2.2 Building the application

3.3 Running the web application

3.4 Understanding the project layout

3.5 The .csproj project file: Declaring your dependencies

3.6 Program.cs file: Defining your application

3.7 Adding functionality to your application

3.7.1 Adding and configuring services

sitemap