public async Task <IActionResult> Post(Todo todo) { _todoRepo.Add(todo); if (await _todoRepo.Save()) { await hub.Clients.All.SendAsync("ReceivedMessage"); return(Ok(todo.Title)); } return(StatusCode(StatusCodes.Status500InternalServerError, $"Todo with title: {todo.Title} could not be created")); }