public static IEnumerable <TResult> Query <TSource, TResult>(this IEnumerable <TSource> enumerable, string sql) { Debug.Assert(enumerable != null); Debug.Assert(string.IsNullOrEmpty(sql) == false); EnumerableQuery <TSource, TResult> query = new EnumerableQuery <TSource, TResult>(sql); query.Compile(); return(enumerable.Query <TSource, TResult>(query)); }
public static IEnumerable <TResult> Query <TSource, TResult>(this IEnumerable <TSource> enumerable, EnumerableQuery <TSource, TResult> query) { Debug.Assert(enumerable != null); Debug.Assert(query != null); return(query.Evaluate(enumerable)); }