Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教代码问题:表达式树解析 #18

Open
zhrong92 opened this issue Nov 15, 2019 · 1 comment
Open

请教代码问题:表达式树解析 #18

zhrong92 opened this issue Nov 15, 2019 · 1 comment

Comments

@zhrong92
Copy link

List strs = new List() { "张三3" };
var model = con.QuerySet().Where(u=> strs.Contains(u.Name)).Get();
看到您的代码执行结果,将“strs.Contains(u.Name)”作为MethodCallExpression解析的时候,表达式Object类型是“ConstantExpression”,我尝试实现的时候发现Object是“MemberExpression”类型,这样就没有办法获取strs的值,请问是什么地方出现问题呢?

@SkyChenSky
Copy link
Owner

在解析树之前我会做一次修树,就是为了更加容易的解析,你可以看看trimtree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants