读书人

How can I implement the dynamic ord

发布时间: 2012-03-15 11:50:39 作者: rapoo

How can I implement the dynamic orderby in linq to entity
Just my qestion

[解决办法]
Hi lnq,

I think you can try this:
http://www.cnblogs.com/Magicworks/archive/2011/04/10/2011725.html

[解决办法]

探讨
what is "dynamic orderby" you said?

a simple way is extract a Predicate<Entity> param:


C# code
IList<T> OrderBy(IList<T> set, Predicate<T> orderby)
{
return set.OrderBy(x => orderby(x))……

读书人网 >.NET

热点推荐