public async Task JoinSession(string sessionId) { if (null == sessionId) { throw new ArgumentNullException("sessionId"); } // TODO: call the service to make sure we have permissions await Groups.Add(Context.ConnectionId, sessionId); var connectionId = Context.ConnectionId; var userName = Context.User?.Identity?.Name ?? "Anonymous"; _services.AddClient(new Client { ConnectionId = connectionId, Name = userName, SessionId = sessionId }); }