You've been reading about the MVC architecture and are trying to understand the components. If you wanted to add logic to fetch data from a database when a user visits a certain page, which component of MVC would handle this?
- Model
- View
- Controller
- Middleware
In the MVC (Model-View-Controller) architecture, the 'Model' component handles data-related logic, such as fetching data from a database. It represents the application's data and business logic. The 'Controller' handles user input and coordinates the flow of data between the 'Model' and 'View' components.
Loading...
Related Quiz
- You're working on an ASP.NET Core project where the client needs real-time updates from the server without constantly polling the server. Which technology in ASP.NET Core would you leverage?
- When performing unit testing in ASP.NET Core, what attribute is commonly used to signify a method as a test method?
- You've just started with ASP.NET Core and want to set up a new MVC project. Which tool or environment would you typically use to create this project?
- Your application uses ASP.NET Core Identity for authentication. During the security audit, it was pointed out that the application should enforce password reset every 90 days. How can you enforce this in ASP.NET Core?
- If a developer is looking to quickly scaffold a new ASP.NET Core controller, which CLI command would they most likely use?