public static Task <List <T> > ToListAsync <T>(this IQueryable <T> source) { if (IsInUnitTest) { return(Task.FromResult(source.ToList())); } return(QE.ToListAsync(source)); }
public static Task <List <T> > ToListAsync <T>(this IQueryable <T> source) where T : class { if (source is EntitySet <T> ) { source = (source as EntitySet <T>).DbSet; } return(Extensions.ToListAsync(source)); }