Ejemplo n.º 1
0
 public static TSource First <TSource>(this IQueryable <TSource> source, Expression <Func <TSource, string> > predicate, object parameter)
 {
     return((TSource)EvalLinq.Execute("{1}.First({expression});", predicate, parameter, source));
 }
Ejemplo n.º 2
0
 public static IQueryable <TSource> TakeWhile <TSource>(this IQueryable <TSource> source, Expression <Func <TSource, int, string> > predicate, object parameter)
 {
     return((IQueryable <TSource>)EvalLinq.Execute("{1}.TakeWhile({expression});", predicate, parameter, source));
 }
Ejemplo n.º 3
0
 public static bool Any <TSource>(this IEnumerable <TSource> source, Expression <Func <TSource, string> > predicate, object parameter)
 {
     return((bool)EvalLinq.Execute("{1}.Any({expression});", predicate, parameter, source));
 }
Ejemplo n.º 4
0
 public static IQueryable <object> SelectDynamic <TSource>(this IQueryable <TSource> source, Expression <Func <TSource, int, string> > selector, object parameter)
 {
     return((IQueryable <object>)EvalLinq.Execute("{1}.Select({expression});", selector, parameter, source));
 }
Ejemplo n.º 5
0
 public static IOrderedQueryable <TSource> ThenByDescendingDynamic <TSource, TKey>(this IOrderedQueryable <TSource> source, Expression <Func <TSource, string> > keySelector, IComparer <TKey> comparer, object parameter)
 {
     return((IOrderedQueryable <TSource>)EvalLinq.Execute("{1}.ThenByDescending({expression}, {2});", keySelector, parameter, source, comparer));
 }
Ejemplo n.º 6
0
 public static TSource SingleOrDefault <TSource>(this IEnumerable <TSource> source, Expression <Func <TSource, string> > predicate, object parameter)
 {
     return((TSource)EvalLinq.Execute("{1}.SingleOrDefault({expression});", predicate, parameter, source));
 }
Ejemplo n.º 7
0
 public static IOrderedEnumerable <TSource> OrderByDynamic <TSource, TKey>(this IEnumerable <TSource> source, Expression <Func <TSource, string> > keySelector, IComparer <TKey> comparer, object parameter)
 {
     return((IOrderedEnumerable <TSource>)EvalLinq.Execute("{1}.OrderBy({expression}, {2});", keySelector, parameter, source, comparer));
 }
Ejemplo n.º 8
0
 public static IOrderedEnumerable <TSource> OrderByDescendingDynamic <TSource>(this IEnumerable <TSource> source, Expression <Func <TSource, string> > keySelector, object parameter)
 {
     return((IOrderedEnumerable <TSource>)EvalLinq.Execute("{1}.OrderByDescending({expression});", keySelector, parameter, source));
 }
Ejemplo n.º 9
0
 public static IEnumerable <TSource> SkipWhile <TSource>(this IEnumerable <TSource> source, Expression <Func <TSource, string> > predicate, object parameter)
 {
     return((IEnumerable <TSource>)EvalLinq.Execute("{1}.SkipWhile({expression});", predicate, parameter, source));
 }
Ejemplo n.º 10
0
 public static TValue Execute <TValue>(this IQueryable source, string expression, object parameter)
 {
     return((TValue)EvalLinq.Execute("{1}." + expression, null, parameter, source));
 }
Ejemplo n.º 11
0
 public static long LongCount <TSource>(this IEnumerable <TSource> source, Expression <Func <TSource, string> > predicate, object parameter)
 {
     return((long)EvalLinq.Execute("{1}.LongCount({expression});", predicate, parameter, source));
 }
Ejemplo n.º 12
0
 public static IEnumerable <object> SelectMany <TSource>(this IEnumerable <TSource> source, Expression <Func <TSource, int, string> > selector, object parameter)
 {
     return((IEnumerable <object>)EvalLinq.Execute("{1}.SelectMany({expression}).Cast<object>();", selector, parameter, source));
 }