IAsyncEnumerable<T>
A .NET interface for a sequence whose items arrive over time, consumed with await foreach.
In more detail
It is how an API streams many rows without buffering them all in memory; EF Core exposes it through AsAsyncEnumerable. Write one with an async method that uses yield return.
Related terms
- iterator — An object that produces the items of a sequence one at a time, on request, instead of all at once.
- foreach — The C# loop that asks a collection for its enumerator and hands you one item at a time.
- async and await — Language keywords for writing code that waits for slow work, such as a network call, without blocking a thread.
Taught in
- Async and Await: Managing Concurrency — Modern .NET Core, C# & Enterprise Microservices