Compiler Error CS8403

Method 'method' with an iterator block must be 'async' to return '{IAsyncEnumerable<T>|IAsyncEnumerator<T>}'

To correct this error

Mark your method with the async modifier.

See also