Task 2: Complete ListController

Complete the Jobs() action method in ListController. Right now, it returns a view, but we need to send some details about jobs to that view.

  1. The view relies on ViewBag.jobs, so to start create a list in the action method called jobs.
  2. If the user selects “View All”, you should use JobData.FindAll() to populate jobs with all the jobs and update ViewBag.title. If the user selects something specific, you should use JobData.FindJobsByColumnAndValue() to populate jobs with jobs that only match that criteria and update ViewBag.title to include the criteria the user chose.
  3. Make sure to set ViewBag.jobs equal to jobs and run the program to see how it is working now!

If everything looks good to you, run the tests in TestTaskTwo in AutogradingTests to make sure you are on the right track before proceeding to task three.