Introducing ASP.NET Core

At the time of writing this book, .NET Core 3.1 is the LTS (short for Long Term Support) version of the framework powered by Microsoft and the community. ASP.NET Core is the highly modular web framework that runs over the .NET Core platform: it can be used to develop a wide range of web solutions, such as web applications, web assembly client applications and web API projects.

To learn about some of the basic concepts of ASP.NET Core, we need to understand the Model View Controller (MVC) pattern that is implemented in ASP.NET Core. 

MVC separates our web application by grouping implementations into three different areas. In a web environment, the starting point is usually a web request that's made by a client or a generic user. The request passes through a middleware pipeline, and the controller then handles it. The controllers also perform some logic operations and populate our model.

The model is the representation of the state of the application. When it is associated with a view, it is called a view model. Once the model is populated, the controller returns a specific view, depending on the request. The purpose of the views is to present data through HTML pages.

In the case of a web API stack, which is the typical way of building web services in ASP.NET Core, the process is the same except for the view part. Instead of this, the controller serializes the model in the response.

To understand how ASP.NET Core helps developers build web services, let's go through the history of the ASP.NET framework.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.255.134