ASP.NET Core is a cross-platform framework for web applications. Its platform receives HTTP requests and produces responses; application frameworks such as MVC, Razor Pages, and Blazor build on that foundation. These frameworks solve different problems and sometimes offer different ways to solve the same problem. section 1.3 section 1.1
The platform's essentials are the request pipeline, middleware, and services. For each request, middleware components inspect the request and can modify the response before passing control onward. They can also short-circuit the pipeline. If none generates a response, ASP.NET Core returns HTTP 404 Not Found. Order matters when configuring the pipeline in Program.cs; a component cannot handle a request it never receives. section 12.2 section 12.2.1 section 12.0
A typical MVC response shows how the layers fit together: routing matches a URL to an endpoint, a controller action returns a ViewResult containing a view name and model, and the Razor view engine uses that model to generate the browser response. The platform handles the HTTP work beneath the application code. section 2.3.4 section 1.1.5
Common development work builds on that foundation:
- Use configuration, dependency injection, logging, and static-content middleware for application-wide concerns. section 15.5
- Use caching for reusable data or responses, and Entity Framework Core for relational database access. section 17.0
- Choose MVC controllers or Razor Pages for HTML applications; ASP.NET Core also supports RESTful services and Blazor applications. section 1.2.5 section 1.3
From first response to application
An RSVP application ties together a home page, a form, validation, a thank-you page, and an attendee summary. A larger store application starts with the basic web project template and adds features as needed, including Entity Framework Core data access, pagination, and Bootstrap styling. Both make the platform's request handling visible through user-facing results. section 3.1 section 7.1 section 7.6
Listing 7.1 Creating the SportsStore project
dotnet new globaljson --sdk-version 7.0.100 --output SportsSln/SportsStore dotnet new web --no-https --output SportsSln/SportsStore --framework net7.0 dotnet new sln -o SportsSln dotnet sln SportsSln add SportsSln/SportsStore
The project-creation commands show a concrete .NET 7 starting point: pin the SDK, create a web project, create a solution, and add the project to it. section 7.1


