Click here to Skip to main content
13,287,343 members (57,111 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I got below Functions for where clause
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(
                   typeof(Queryable), "Where",
                   new Type[] { source.ElementType },
                   source.Expression, Expression.Quote(lambda)));

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

please any one help me..
Posted 12-Aug-12 21:36pm
Updated 6-Oct-12 2:33am

1 solution

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.171207.1 | Last Updated 6 Oct 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100