Beispiel #1
0
 public async Task AddUserAsync(UserContainer user)
 {
     lock (_list)
     {
         _list.Add(user);
     }
 }
Beispiel #2
0
        public Task AddUserAsync(UserContainer user)
        {
            lock (_list)
            {
                _list.Add(user);
            }

            return(Task.CompletedTask);
        }
Beispiel #3
0
        public async Task AddUserAsync(UserContainer user)
        {
            await _dataContext.Sessions.AddAsync(new SessionEntity()
            {
                Fight       = user.Fight,
                UserId      = user.Id,
                UserName    = user.Name,
                LastTouched = DateTimeOffset.UtcNow
            });

            await _dataContext.SaveChangesAsync();
        }