Example #1
0
        public async Task Login(string name)
        {
            await _votingRepository.LoginUser(name);

            Clients.All.userConnected(name);

            await _unitOfWork.SaveChangesAsync();

            if (!LoggedInUsers.ContainsKey(Context.ConnectionId))
            {
                LoggedInUsers.Add(Context.ConnectionId, name);
            }
        }