开发者

Linq Expression string with inline values

开发者 https://www.devze.com 2023-01-14 02:16 出处:网络
I am trying to build expression strings for use with IOC extended nHydrate. When I call ToString() on my expression I get something like this:

I am trying to build expression strings for use with IOC extended nHydrate. When I call ToString() on my expression I get something like this:

employee => employee.Username == value( S开发者_C百科ome type name here )

Is there a way to resolve that value call to the actual value?

employee => employee.Username == "Captain Spiffy"


Doing a ToString() would only fetch you the end expression result, If it is a real expression tree, Like a Expression> then you can traverse the expressions tree using the Expression Visitor class. Make sure this is not a Func!

-Fahad

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号