public override Task OnConnected() { var userID = Context.QueryString["UserID"]; if (userID != null) { int uId = Convert.ToInt32(userID); _UserRepo.SaveUserOnlineStatus(new OnlineUser { UserID = uId, ConnectionID = Context.ConnectionId, IsOnline = true }); RefreshOnlineUsers(uId); } return(base.OnConnected()); }