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)); }
public static Task <T> FirstAsync <T>(this IQueryable <T> source) { if (IsInUnitTest) { return(Task.FromResult(source.First())); } return(QE.FirstAsync(source)); }