Quote:
Both of the preceding actions are non-blocking as of ASP.NET Core 3.0
However the first example seems to be incorrect, since the first action example calls: _repository.GetProducts()
which returns a List object - as shown in first example on this page - it is a synchronous blocking call to the database returning a List. Only if return type of GetProducts would be IAsyncEnumerable then even if the controller action signature itself would be IEnumerable still the serializer would detect its actually an IAsync and would iterate over it asynchronously.
Is that right?
Quote:

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Quote:
However the first example seems to be incorrect, since the first action example calls:
_repository.GetProducts()which returns a List object - as shown in first example on this page - it is a synchronous blocking call to the database returning a List. Only if return type of
GetProductswould beIAsyncEnumerablethen even if the controller action signature itself would be IEnumerable still the serializer would detect its actually an IAsync and would iterate over it asynchronously.Is that right?
Quote:

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.