Task 3: Complete SearchController
Results() action method to
Results()method should take in two parameters. Both parameters must be strings and the first one should be called “searchType” and the second one should be called “searchTerm”.
- First, you need to create a local variable called “jobs” that is of type
- If the user enters “all” in the search box, or if they leave the box empty,
JobData. Otherwise, send the search information to
FindByColumnAndValue. In either case, store the results in a
ListController.ColumnChoicesinto the view, as the existing
Index()action method does.
Run the tests in
TestTaskThree to see how you did!