Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I got below Functions for where clause
C#
public static IQueryable<T> Where<T>(this IQueryable<T> source, string predicate, params object[] values)
       {
           return (IQueryable<T>)Where((IQueryable)source, predicate, values);
       }

       public static IQueryable Where(this IQueryable source, string predicate, params object[] values) {
           if (source == null) throw new ArgumentNullException("source");
           if (predicate == null) throw new ArgumentNullException("predicate");
           LambdaExpression lambda = DynamicExpression.ParseLambda(source.ElementType, typeof(bool), predicate, values);
           return source.Provider.CreateQuery(
               Expression.Call(
                   typeof(Queryable), "Where",
                   new Type[] { source.ElementType },
                   source.Expression, Expression.Quote(lambda)));
       }

But how to call this functions from specific type ...
C#
public static IQueryable<mytable> Where<mytable>(this IQueryable<mytable> source, string predicate, params object[] values)

please any one help me..
Posted
Updated 6-Oct-12 1:33am
v5

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900