Imagine you're working on an e-commerce application using ASP.NET Core MVC. A user wants to view details of a product. Which component of the MVC pattern would be responsible for fetching the product details from the database?

  • Model
  • View
  • Controller
  • Middleware
In the MVC (Model-View-Controller) pattern, the Model component is responsible for managing the application's data and business logic. In this scenario, it would be responsible for fetching the product details from the database. The Model interacts with the database and provides data to the Controller, which then passes it to the View for rendering.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *