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

Commit 109e613

Browse files
committed
Corrected async -> sync execution.
1 parent 6cda611 commit 109e613

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
@@ -158,7 +158,8 @@ IEnumerator IEnumerable.GetEnumerator()
158158
/// <returns>Query result as <see cref="IAsyncEnumerable{T}"/>.</returns>
159159
public IAsyncEnumerator<T> GetAsyncEnumerator(CancellationToken cancellationToken)
160160
{
161-
return QueryProvider.ExecuteAsyncEnumerable<T>(Expression, cancellationToken).Result.GetAsyncEnumerator(cancellationToken);
161+
return Task.Run(() => QueryProvider.ExecuteAsyncEnumerable<T>(Expression, cancellationToken),
162+
cancellationToken).Result.GetAsyncEnumerator(cancellationToken);
162163
}
163164

164165
/// <summary>

0 commit comments

Comments
 (0)