Skip to content

12. Conclusion

This document has outlined the development of a MVC web application using the [ASP.NET Core MVC] framework: an application whose HTML pages are generated by the server, using [Razor] views, without a browser-side [JavaScript] framework. He followed the [NestJS] course step by step, which itself is based on the course "Introduction to ASP.NET MVC Through Examples": controllers and routing to views, forms, internationalization, security, and data access, followed by a comprehensive case study.

This brings us full circle: we return to the [.NET] platform from the original course, in its modern version. There are numerous parallels between the three frameworks:

ASP.NET MVC (2013)
NestJS (2026)
ASP.NET Core MVC (2026)
controller, action ([ActionResult])
[@Controller], [@Get], [@Post]
[Controller], [[HttpGet]], [[HttpPost]], [IActionResult]
Action model, [[Required]], [[Range]]...
class DTO, decorators of [class-validator]
pattern linkage, [[Required]], [[Range]]... (unchanged)
[ModelState.IsValid]
[validate()] and re-display of the form
[ModelState.IsValid] and re-display of the form
views [Razor] ([.cshtml]), [_Layout.cshtml]
views [Handlebars] ([.hbs]), [layout.hbs]
views [Razor] ([.cshtml]), [_Layout.cshtml], [_ViewStart.cshtml]
partial views, helpers HTML
Partials [{{> name}}], helpers
partial views, C# methods, Tag Helpers, view base class
[TempData] (in the session)
flash message in a cookie
[TempData] (in an encrypted cookie)
session
cookies (token JWT, language): stateless server
cookies (token JWT, language): stateless server
action filters, [[Authorize]]
middleware, guards, interceptors, filters
middleware, filters, [[Authorize(Roles = ...)]], [JwtBearer]
resource files ([.resx])
dictionaries JSON, helper [t]
dictionaries JSON, [@T(...)], [UseRequestLocalization]
[Entity Framework]
[TypeORM]
[Entity Framework Core]
Dependency injection (third-party library)
modules, [@Injectable]
Integrated: [AddSingleton], [AddScoped], [AddTransient]

Compared to [NestJS], the following points are particularly noteworthy:

  • the typing of [C#] is checked all the way through: an action parameter declared as [int] is actually converted to an integer; a view declares the type of its model ([@model]); and a typo in a view results in a compilation error;
  • Many features are provided by the framework without the need for additional libraries: validation, flash messages ([TempData]), localization, error pages, and dependency injection;
  • [Razor] allows [C#] code in views: this is a convenience, but it requires discipline to ensure that views remain simple layouts.

The case study shows that a classic HTML application, without the essential [JavaScript], remains a simple and robust solution: each page is a URL, the browser’s “Back” button works, and the server controls everything. The limited use of [JavaScript] (confirmation windows) enhances the user experience without being necessary for the application to function.

For more information, see the documentation for [ASP.NET Core] (learn.microsoft.com/aspnet/core) and that of [Entity Framework Core] (learn.microsoft.com/ef/core), and compare this application to its sister application, [NestJS].