问题描述
动态编写LINQ查询和Lambda表达式的最佳方法是什么?我正在考虑最终用户可以设计业务逻辑规则的应用程序,然后必须执行。
我很抱歉,如果这是一个新手的问题,但最好从经验中获得最佳实践将是非常好的。
我不能推荐高于您阅读Bart De Smet的贴子(),他对Lambda来说真的很棒。
他最近的系列文章涵盖了动态Lambda,从
绝对漂亮的代码。
What is the best way of dynamically writing LINQ queries and Lambda expressions?
I am thinking of applications where the end user can design business logic rules, which then must be executed.
I am sorry if this is a newbie question, but it would be great to get best practices out of experience.
I cannot recommend higher than you reading through the postings of Bart De Smet (http://community.bartdesmet.net/blogs/bart/), he is really brilliant when it comes to Lambda.
His recent series covered dynamic Lambda, starting with http://community.bartdesmet.net/blogs/bart/archive/2008/08/26/to-bind-or-not-to-bind-dynamic-expression-trees-part-0.aspx
Absolutely beautiful code.
这篇关于动态LINQ和动态Lambda表达式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!