Skip to content
This repository was archived by the owner on Feb 1, 2025. It is now read-only.

Commit ea55615

Browse files
committed
Corrected async -> sync execution.
1 parent 4c09285 commit ea55615

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Source/LinqToDB.EntityFrameworkCore/Internal/LinqToDBForEFQueryProvider.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ IEnumerator IEnumerable.GetEnumerator()
160160
/// <returns>Query result as <see cref="IAsyncEnumerable{T}"/>.</returns>
161161
public IAsyncEnumerator<T> GetAsyncEnumerator(CancellationToken cancellationToken)
162162
{
163-
return QueryProvider.ExecuteAsyncEnumerable<T>(Expression, cancellationToken).Result.GetAsyncEnumerator(cancellationToken);
163+
return Task.Run(() => QueryProvider.ExecuteAsyncEnumerable<T>(Expression, cancellationToken),
164+
cancellationToken).Result.GetAsyncEnumerator(cancellationToken);
164165
}
165166

166167
/// <summary>

0 commit comments

Comments
 (0)