December 2019
Intermediate to advanced
598 pages
12h 21m
English
Arguably the most valuable piece of our real-time API is pushing new answers to subscribed clients. In this section, we are going to learn how to do this. If we think about it, the ideal place to do this is in the questions API controller, which is where an answer is posted. So, when an answer is posted, we want SignalR to push the updated question with the saved answer to all the clients that are subscribed to the question. Let's implement this by carrying out the following steps in QuestionsController.cs:
using Microsoft.AspNetCore.SignalR;using QandA.Hubs;
Read now
Unlock full access