Lyra
Learn
AI Learning Platform
π Midnight
π Comfort
π₯ Ember
π Paper
β Contrast
Exams
Sign in to track progress
β Back to the lesson
Module 3 Β· Quiz
MVC, Minimal APIs, and Filters
1. When is it more appropriate to use Minimal APIs instead of MVC controllers?
When the application requires complex view rendering.
For small, endpoint-shaped services.
When working with large databases.
To implement extensive logging protocols.
2. What is the main reason for using a filter instead of middleware for auditing who viewed each transcript?
Filters are executed after middleware.
Filters provide lower response times.
Filters can access MVC model-bound context while middleware cannot.
Middleware can handle errors more gracefully.
3. What happens when a malformed JSON body is submitted to an action that takes an UpdateReviewDto and no ModelState validation is enforced?
The action will not execute.
ModelState remains valid.
The action executes and ModelState is invalid.
An automatic 400 response is returned.
4. What is a key strategy to prevent over-posting in your application?
Use server-rendered views for every action.
Implement DTO/ViewModel boundaries.
Limit the number of fields in the API responses.
Automatically validate all incoming requests.
Submit answers
Continue: State, Caching, and Config β
Review this lesson
Retake quiz