The entire data set is loaded into memory with ToListAsync() when executing the procedure
See original GitHub issueWhen executing the procedure with SqlQueryAsync
, the entire data set is asynchronously loaded into memory with ToListAsync()
.
Wouldn’t it be better to use AsAsyncEnumerable()
on the IQueryable so that the data set can be asynchronously enumerated and return IAsyncEnumerable?
This would require having Microsoft.Bcl.AsyncInterfaces
package installed on projects targeting netstandard 2.0 (for EFCore3)
Also, thanks for your hard work on this amazing tool, it’s a time saver.
Issue Analytics
- State:
- Created 5 months ago
- Comments:12 (8 by maintainers)
Top Results From Across the Web
Unit Testing with Moq sometimes fails on ToListAsync()
I have experienced some issues with the In memory database. ... If it is a simple GetAll() method, do you really need to...
Read more >Efficient Querying - EF Core
ToList();. Since the number of rows returned depends on actual data in your database, it's impossible to know how much data will be...
Read more >Entity Framework performance improvement: [Section 3] ...
When performing multiple database operations in parallel, use Task.WhenAll() to execute them asynchronously. This allows all the operations to be executed ...
Read more >In EF Core every foreach is a potential runtime error that ...
ToList() disables data streaming and put all data into the memory. ... E) Rewrite the first method to not make any (ANY) database...
Read more >Optimizing Entity Framework Core Database Queries With ...
When a method call allocates more memory than the specified threshold, DPA will mark it as a potential issue in the editor: Similarly,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am.
Moving to backlog for now, will reconsider if more ask for it.