December 2019
Intermediate to advanced
598 pages
12h 21m
English
Now, we are going to rework the implementation of the post question endpoint so that we have a naive implementation of custom model binding:
using System.IO; using Newtonsoft.Json;
[HttpPost]public async Task<ActionResult<QuestionGetSingleResponse>> PostQuestion() { var json = await new StreamReader(Request.Body).ReadToEndAsync(); var questionPostRequest = JsonConvert.DeserializeObject<QuestionPostRequest>(json); ...Read now
Unlock full access