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.
Loading...
Related Quiz
- Custom service configurations and dependency injections are typically defined in the ________ method of the "Startup.cs" file.
- To facilitate the development and debugging process, developers can use the _________ extension in Visual Studio Code for ASP.NET Core.
- In the context of Razor views, which directive would you use in _ViewImports.cshtml to define a shared model type across views?
- The method _________ in UserManager is used to sign in a user programmatically after the user has been created.
- The default convention in ASP.NET Core MVC looks for views in the _________ folder.