Understanding the internals of an ASP.NET Core 5 web API
ASP.NET Core is a unified framework that runs on top of .NET Core and is used to develop web applications (MVC/Razor), RESTful services (web API) and, most recently, web assembly-based client application (Blazor apps). The fundamental design of ASP.NET Core applications is based on the Model View Controller (MVC) pattern, which divides code into three primary categories:
- Model: This is a POCO class that holds the data and is used to pass data between various layers of the application. Layers include passing data between the repository class and the service class, or passing information back and forth between the client and server. The model primarily represents the resource state, or the domain model of the application, and contains information that you have requested. For example, if we wanted to store user profile information, it can be represented by the POCO class
UserInformation
, and can contain all the profile information...