从表达式树生成SQL

从表达式树生成SQL

本文介绍了从表达式树生成SQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我想从表达式树生成oracle sql语句。

或如何从表达式中提取正文的示例

I want to generate oracle sql statements from an expression tree.
or an example how to extract the body from the expression

tableRepository.Select(s =>  s.Id == 1 && s.Description == "ee" )



应生成


should generate

select * from table where ID= 1 and description = 'ee';





我想举例说明如何提取表达式树体内的每个表达式





I would like to have an example how to extract every expression in the body of the expression tree

i want to achive something like this:
http://ryanohs.com/2016/04/generating-sql-from-expression-trees/





我尝试过:





What I have tried:

Expression<Func<T, bool>> where
expression = where.Body



循环遍历树?


loop through the tree?

推荐答案



这篇关于从表达式树生成SQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 09:37