Extending the GetQuestions Action Method for Searching
Learn about GetQuestions method to handle a search request.
We don’t always want all of the questions to be returned in the api/questions
endpoint. Recall that our frontend had a search feature that returned questions that matched the search criteria.
Steps to handle a search request
Let’s extend our GetQuestions
method to handle a search request. To do that, follow these steps:
Add a search parameter to the
GetQuestions
method:
Get hands-on with 1400+ tech skills courses.