public void AddOrUpdatePlayers(IEnumerable <PlayerDto> players) { var playerDtos = players?.ToArray() ?? new PlayerDto[0]; if (!playerDtos.Any()) { return; } foreach (var dtos in playerDtos.Paged(1000)) { _playerRepository.AddOrUpdatePlayers(dtos); } _validCache = false; }