loading...

Discussion on: What's the big deal with IAsyncEnumerable<T> in .NET Core 3.0?

Collapse
artour profile image
ar-tour

Do you know how does it work under the hood? I mean, in your example you pass query like select * from... but, since it's lazy loaded, what's the actual query executed?
How I see it is it retrieves records one by one, which is something similar to looping through IQueryable.
Am I wrong? If so, how does it work exactly?

Collapse
slavius profile image
Slavius

I don't know exactly how this works with other DB servers but MSSQL uses so called TDS (Tabular Data Stream) protocol to deliver results which is a stream of data rows. This allows asynchronous stream processing within .Net Core applications leveraging IAsyncEnumerable<>.