首页新闻找找看学习计划

请帮看下如何转化这段linq语句.

0
[已关闭问题] 关闭于 2015-09-01 13:46
 /*
            ColumnsClip<T> columnsClip = new ColumnsClip<T>(Expression.Lambda<Func<T, T>>(Expression.Call(null, (MethodInfo)methodof(ExpressionExt.Columns), new Expression[] { expression = Expression.Parameter(typeof(T), "t"), Expression.NewArrayInit(typeof(object), new Expression[] { Expression.Convert(Expression.Call(null, (MethodInfo)methodof(ExpressionExt.As), new Expression[] { Expression.Call(null, (MethodInfo)methodof(ExpressionExt.CountAll), new Expression[] { Expression.Convert(expression, typeof(IEntity)) }), Expression.Constant("TotalCount", typeof(string)) }), typeof(object)) }) }), new ParameterExpression[] { expression }));

            */

            int num = 0;
            var columnsClip = new ColumnsClip<T>((t) => t.Columns(t.CountAll().As("TotalCount")));

 

注释的原始的linq.

下面的是我写的转化的. 不过好像不多. 请大牛帮指点一下..

colvinliu的主页 colvinliu | 初学一级 | 园豆:6
提问于:2015-08-11 10:24
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册