开发者

How to find which Expression(s) matched in a linq query

I have a set of expressions saved in a database table. The requirement is to match a bunch of these expressions against a Linq (to Entities) query. For performance sake I am combining the expressions with an OR clause so I can run the query just once instead of running the same query for each expression one by one. Is there a way to find out out which of the开发者_开发知识库 expressions really matched against the query?

Thanks A


Not really. The only way is evaluate each response separately, and then once you have all the resultsets, union them in LINQ.

It's really not easy to do in the database either, at least I 'm pretty sure.

HTH.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜