public async Task AsAsyncEnumerable() { var count = 0; await _dbSet.AddRangeAsync(_list); await foreach (var y in _dbSet.AsAsyncEnumerable()) { ++count; } Assert.AreEqual(2, count); }