Пример #1
0
 public async Task AddUserAsync(UserContainer user)
 {
     lock (_list)
     {
         _list.Add(user);
     }
 }
Пример #2
0
        public Task AddUserAsync(UserContainer user)
        {
            lock (_list)
            {
                _list.Add(user);
            }

            return(Task.CompletedTask);
        }
Пример #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();
        }