多条件查询

http://www.cnblogs.com/lyj/archive/2008/03/25/1122157.html   没用

 

 

这个才是 我想要的

http://www.cnblogs.com/killuakun/archive/2008/08/03/1259389.html

顺便又给了一个这个

http://multitierlinqtosql.codeplex.com/

 

 

google : PredicateExtensions

 

 继LINQ动态组合查询PredicateExtensions讲解

http://www.cnblogs.com/whitewolf/archive/2010/08/02/1790390.html


comment

 

http://www.albahari.com/nutshell/predicatebuilder.aspx

 

         public static Expression<Func<T, bool>> ExpressionEqual<T, P>(this T entity, string property, P value) where T:class
        {

            if (value == null)
            {
                
            }

            ParameterExpression param = Expression.Parameter(typeof(T), "entity");

            Expression left = Expression.Property(param, typeof(T).GetProperty(property));           

            left = Expression.Convert(left, value.GetType());
            Expression right = Expression.Constant(value);
            Expression filter = Expression.Equal(left, right);
            Expression<Func<T, bool>> predicate = Expression.Lambda<Func<T, bool>>(filter, param);
            return predicate;
        }

 

  

 

http://dotnetslackers.com/articles/aspnet/Understanding-ASP-NET-MVC-Model-Binding.aspx

http://www.cnblogs.com/know/archive/2012/03/31/2426730.html

http://dotnetslackers.com/articles/aspnet/Understanding-ASP-NET-MVC-Model-Binding.aspx

http://codereview.stackexchange.com/questions/9450/contains-method-in-lambda-expression

http://stackoverflow.com/questions/1566439/linq-help-with-contains-and-a-lambda-query

http://stackoverflow.com/questions/8526684/get-custom-attributes-form-lambda-expression

http://stackoverflow.com/questions/3452404/combining-expressions-in-an-expression-tree

http://stackoverflow.com/questions/3703386/iqueryable-extension-create-lambda-expression-for-querying-a-column-for-a-keywo

posted @ 2012-07-11 00:26  rayray2  阅读(205)  评论(0)    收藏  举报