I've got a situation where I need to have a single LINQ query run non-asynchronously. Reason: There is currently still a bug in how async EF calls load large blobs (more info on that Entity Framework async operation takes ten times as long to complete)
So my options to fix the above bug are to either convert the query to a custom DbCommand and run raw SQL asynchronously, OR I can just change the call from ToListAsync
to a ToList
.
TLDR --- Question:
I know that calling asynchronous code synchronously can cause a deadlock (e.g. query.ToListAsync().Result
), however, does calling the non-asynchronous version of ToList inside of an asynchronous method have the same issue?