Beispiel #1
0
 public static Task <T> FirstAsync <T>(this IQueryable <T> source, Expression <Func <T, bool> > predicate)
 {
     if (IsInUnitTest)
     {
         return(Task.FromResult(source.First(predicate)));
     }
     return(QE.FirstAsync(source, predicate));
 }
Beispiel #2
0
 public static Task <T> FirstAsync <T>(this IQueryable <T> source)
 {
     if (IsInUnitTest)
     {
         return(Task.FromResult(source.First()));
     }
     return(QE.FirstAsync(source));
 }