public async Task SendComment(CommentCreate.Command command) { var userName = GetUserName(); command.UserName = userName; var comment = await mediator.Send(command); await Clients.Group(command.ActivityId.ToString()).SendAsync("RecieveComment", comment); }
public async Task <ActionResult <Unit> > Create(CommentCreate.Command comment) { return(await Mediator.Send(comment)); }