コード例 #1
0
 public static Task <List <T> > ToListAsync <T>(this IQueryable <T> source)
 {
     if (IsInUnitTest)
     {
         return(Task.FromResult(source.ToList()));
     }
     return(QE.ToListAsync(source));
 }
コード例 #2
0
        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));
        }