Luna Tech

Tutorials For Dummies.

ASP.NET Family Intro


0. Intro

When we try to create an ASP.NET Core project, there are many different templates to choose from and for new starters, they might feel confused about the difference and use cases for each of them.

This article aims to provide a simple explanation about these templates starting with ASP.NET Core.

1. Main Players

  1. ASP.NET Core Web App (MVC)
  2. ASP.NET Core Web App (Razor Pages)
  3. ASP.NET Core Blazor
  4. ASP.NET Core Web API

Main Difference - How we build the UI

  1. ASP.NET Core Web App (MVC) and ASP.NET Core Web App (Razor Pages) are both using Razor syntax and act as Server-side rendering Web App, meaning the server will generate HTML and return to client.
  2. ASP.NET Core Blazor can build rich client side and server side applications using C# instead of JavaScript, it is pretty new and attracting many attentions now.
  3. ASP.NET Core APIs are used to create APIs, before .NET 6 we use controller to create APIs, from .NET 6 we can also create minimal APIs.

When to use which

  1. ASP.NET Core Web App (MVC) - larger, enterprise applications
  2. ASP.NET Core Web App (Razor Pages) - simpler than MVC approach
  3. ASP.NET Core Blazor - client-side rendering, write C# code
  4. ASP.NET Core Web API - create APIs

2. ASP.NET Framework VS ASP.NET Core

ASP.NET Framework support Windows only, ASP.NET Core supports cross-platform.

ASP.NET Framework 4.8 is the latest version and won’t be upgraded anymore.