结果相当于实现
List<FavShopModel>.where(o=>o.zdit==42)
ParameterExpression pe = Expression.Parameter(typeof(FavShopModel), "o"); Expression left = Expression.Property(pe, typeof(string).GetProperty("zdid", typeof(int))); Expression right = Expression.Constant(s.zdid); Expression e1 = Expression.Equal(right, left); var results = queryableData.Provider.CreateQuery<FavShopModel>(e1).ToList(); MethodCallExpression whereCallExpression = Expression.Call( typeof(Queryable), "Where", new Type[] { queryableData.ElementType }, queryableData.Expression, Expression.Lambda<Func<string, bool>>(e1, new ParameterExpression[] { pe })); results = queryableData.Provider.CreateQuery<FavShopModel>(whereCallExpression).ToList(); return results;
心好累,求指点
看的好累,求详解