Streaming a csv file to a console app with minimal api-How?
Hey Guys got this methode:
And this one in the Ui:
I want to stream the csv file to the ui, which happens here
Unsure how to do that
2 Replies
you should use IAsyncEnumerable<> in the endpoint
Some reading/examples:
https://anthonychu.ca/post/async-streams-dotnet-core-3-iasyncenumerable/
Async Streams with IAsyncEnumerable in .NET Core 3
One of the most exciting features of .NET Core 3 and C# 8.0 has been the addition of IAsyncEnumerable<T> (aka async streams). But what's so special about it? What can we do now that wasn't possible before?In this article, we'll look at what challenges IAsyncEnumerable<T> is intended to solve, how to implement it in our own applications, and why ...
@phaseshift that worked. amazing, thanks