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