The three main parts of MVC are defined as follows:
Model: A model is a class that describes a problem domain that is of interest to the program designer, which typically encapsulates the data stored in the database, as well as the code that operates the data and executes the business logic of the particular domain.
in ASP. NET MVC, the model is like a data access layer with a tool that includes the Entity Framework or the
Custom code for specific domain logic is combined with nhibernate.
View: A template that dynamically generates HTML pages
Controller: A special class that coordinates the relationship between a view and a model. It responds to user input, talks to the model, and decides which view (if any) to render. in ASP. NET MVC,
This class file is usually represented later by the prefix controller
Attention
It is important to keep in mind that MVC is a high-level architectural pattern, and its use depends on the specific application environment. The context of the ASP. NET MVC is the problem domain (a stateless web environment)
and host System (ASP).
Many of the core policies that ASP. NET MVC relies on are the same as those used by other MVC platforms, plus the benefits of the compiled and managed code it provides, and the new features that take advantage of the language, such as
Lambda expressions, dynamic, and anonymous types make them a powerful development framework. However, in essence, ASP. NET incorporates some of the basic principles used by most MVC-based web frameworks:
A, contract better than configuration (conversion over config)
b, no repetition (aka dry principle)
C, try to keep pluggable (pluggability)
D, to help developers as much as possible, but allow developers to freely play when necessary
The application of MVC in Web framework