当前位置: 代码迷 >> ASP.NET >> 反编译后的 linq to sql 求
  详细解决方案

反编译后的 linq to sql 求

热度:9949   发布时间:2013-02-25 00:00:00
反编译后的 linq to sql 求高手指点
IOrderedQueryable<ParameterByClass> queryable = this.db.ParameterByClass.Where<ParameterByClass>(Expression.Lambda<Func<ParameterByClass, bool>>(Expression.AndAlso(Expression.AndAlso(Expression.AndAlso(Expression.Equal(Expression.Property(expression = Expression.Parameter(typeof(ParameterByClass), "c"), (MethodInfo)methodof(ParameterByClass.get_smallclassID)), Expression.Field(Expression.Constant(this, typeof(compare)), fieldof(compare.classid))), Expression.OrElse(Expression.Equal(Expression.Property(expression, (MethodInfo)methodof(ParameterByClass.get_zhuanye)), Expression.Constant(0, typeof(int))), Expression.Equal(Expression.Property(expression, (MethodInfo)methodof(ParameterByClass.get_zhuanye)), Expression.Constant(3, typeof(int))))), Expression.NotEqual(Expression.Property(expression, (MethodInfo)methodof(ParameterByClass.get_zhuanye)), Expression.Constant(2, typeof(int)))), Expression.Equal(Expression.Property(expression, (MethodInfo)methodof(ParameterByClass.get_pclassName)), Expression.Property(Expression.Call(Expression.Constant(ee), (MethodInfo)methodof(XContainer.Element), new Expression[] { Expression.Convert(Expression.Constant("pcName", typeof(string)), typeof(XName), (MethodInfo)methodof(XName.op_Implicit)) }), (MethodInfo)methodof(XElement.get_Value)), false, (MethodInfo)methodof(string.op_Equality))), new ParameterExpression[] { expression }))

这是一段反编译后得出的代码,不能正常运行,求高手指点。

正确的应该为:

C# code
    IOrderedQueryable<ParameterByClass> queryable = from c in this.db.ParameterByClass                                                                    where //这里的条件语句怎么写?


------解决方案--------------------------------------------------------
把你的代码贴出来;
where后面写法与Lamda表达式写法差不多
  相关解决方案
本站暂不开放注册!
内测阶段只得通过邀请码进行注册!