liveBook · Manning

Template

As explained in ASP.NET Core in Action, 3e

A software template is a predefined starting structure containing code and configuration for building an application.

A software template provides the basic code needed to build an application. Use it as a starting structure, then customize the generated app for your needs. section 3.0

In ASP.NET Core, templates can quickly create runnable web apps. Visual Studio offers project templates, and the .NET CLI provides similar options. section 3.0 section 13.1.1

Razor Pages and MVC starters

Choose the ASP.NET Core Web App template to create a Razor Pages app, or the ASP.NET Core Web App (Model-View-Controller) template for an MVC app. Run the result with Visual Studio or dotnet run. section 13.1.1 section 19.2

Listing 13.1 Creating a new Razor Page application with the .NET CLI
dotnet new sln -n WebApplication1     #1
dotnet new razor -o WebApplication1   #2
dotnet sln add WebApplication1        #3

The CLI listing shows commands for creating a solution and a Razor Pages project, then adding the project to the solution. section 13.1.1

How ASP.NET Core in Action, 3e covers it

How deep it goes
Defines templates and demonstrates creating and running apps, then examining generated files and project structure.
Examples
Uses Razor Pages and MVC starters, including a basic Welcome page and a CLI project-creation sequence.
What it assumes
Assumes access to a .NET development environment and points beginners to SDK and editor setup guidance.
What you can do after
Apply it via Visual Studio or the .NET CLI to create and run a starter ASP.NET Core application.
How it connects
Connects templates to ASP.NET Core, Razor Pages, MVC, and minimal API applications.

Also explained in

Compare how 21 books explain template →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ASP.NET Core in Action, 3e. The section links point to the parts of the book it draws on.