December 2019
Intermediate to advanced
598 pages
12h 21m
English
Let's implement our first action method, which is going to return an array of all the questions:
[HttpGet]public IEnumerable<QuestionGetManyResponse> GetQuestions(){ // TODO - get questions from data repository // TODO - return questions in the response}
We decorate the method with the HttpGet attribute to tell ASP.NET Core that this will handle HTTP GET requests to this resource.
We use the specific IEnumerable<QuestionGetManyResponse> type as the return type.
[HttpGet]public IEnumerable<QuestionGetManyResponse> GetQuestions(){ var ...Read now
Unlock full access