Skip to content

Commit f44330c

Browse files
1 parent ceb65d1 commit f44330c

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

net/DevExtreme.AspNet.Data/Async/ReflectionAsyncAdapter.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ MethodInfo GetCountAsyncMethod() {
4242

4343
public Task<IEnumerable<T>> ToEnumerableAsync<T>(IQueryProvider provider, Expression expr, CancellationToken cancellationToken) {
4444
if(IsEFCore)
45-
return InvokeToArrayAsync<T>(EFCoreMethods.ToArrayAsyncMethod, provider, expr, cancellationToken);
45+
return InvokeToListAsync<T>(EFCoreMethods.ToListAsyncMethod, provider, expr, cancellationToken);
4646

4747
if(IsEF6)
48-
return InvokeToArrayAsync<T>(EF6Methods.ToArrayAsyncMethod, provider, expr, cancellationToken);
48+
return InvokeToListAsync<T>(EF6Methods.ToListAsyncMethod, provider, expr, cancellationToken);
4949

5050
if(IsNH)
5151
return InvokeToListAsync<T>(NHMethods.ToListAsyncMethod, provider, expr, cancellationToken);
@@ -69,21 +69,21 @@ static Exception ProviderNotSupported(IQueryProvider provider) {
6969

7070
static class EF6Methods {
7171
public static readonly MethodInfo CountAsyncMethod;
72-
public static readonly MethodInfo ToArrayAsyncMethod;
72+
public static readonly MethodInfo ToListAsyncMethod;
7373
static EF6Methods() {
7474
var extensionsType = Type.GetType("System.Data.Entity.QueryableExtensions, EntityFramework");
7575
CountAsyncMethod = FindCountAsyncMethod(extensionsType);
76-
ToArrayAsyncMethod = FindToArrayAsyncMethod(extensionsType);
76+
ToListAsyncMethod = FindToListAsyncMethod(extensionsType);
7777
}
7878
}
7979

8080
static class EFCoreMethods {
8181
public static readonly MethodInfo CountAsyncMethod;
82-
public static readonly MethodInfo ToArrayAsyncMethod;
82+
public static readonly MethodInfo ToListAsyncMethod;
8383
static EFCoreMethods() {
8484
var extensionsType = Type.GetType("Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions, Microsoft.EntityFrameworkCore");
8585
CountAsyncMethod = FindCountAsyncMethod(extensionsType);
86-
ToArrayAsyncMethod = FindToArrayAsyncMethod(extensionsType);
86+
ToListAsyncMethod = FindToListAsyncMethod(extensionsType);
8787
}
8888
}
8989

0 commit comments

Comments
 (0)