LyraLearn AI Learning Platform
Exams
← Back to the lesson
Module 2 Β· Quiz

Views, ViewModels, and Action Results

1. What is the primary purpose of a ViewModel in the MVC pattern?
2. Which ActionResult should be used to create a redirect after a successful POST request?
3. What is a potential downside of using ViewBag for passing data to a view?
4. Which of the following ActionResults should be used to return a JSON response for AJAX calls?