Home > Net >  How to generate dynamic lambda
How to generate dynamic lambda

Time:12-31

Linq groupby, need according to the conditions of the user, group,

The following example
Var list=new List ()
List. GroupBy (x=& gt; New {K1=x.N ame, K2=x.C lass})

Where x=& gt; New {K1=x.N ame, K2=x.C lass}, to dynamically generate, can do it

CodePudding user response:

This I haven't written, but wrote a according to the dynamic orderby string,
However, I actually feel it doesn't matter in SQL,
https://blog.csdn.net/hanjun0612/article/details/80521691

CodePudding user response:

https://www.nuget.org/packages/System.Linq.Dynamic/
https://eval-expression.net/

CodePudding user response:

reference 1st floor is nu month god reply:
this I haven't written, but wrote a according to the dynamic orderby string,
However, I actually feel it doesn't matter in SQL,
https://blog.csdn.net/hanjun0612/article/details/80521691

This sort can indeed, but like I said this cause a new anonymous class don't know how to do

CodePudding user response:

refer to the second floor wanghui0380 response:

https://www.nuget.org/packages/System.Linq.Dynamic/https://eval-expression.net/

Is now cited the dymamic linq, it is not too understand principle

CodePudding user response:

Another direction can be directly used GraphGL query, the query itself GraphGL idea is limited to external power

CodePudding user response:

reference 5 floor wanghui0380 reply:
another direction can be directly used GraphGL query, the query itself GraphGL idea is limited power to external

Thank you for your brother, I study

CodePudding user response:

reference indifference, 4/f, 888 response:
Quote: refer to the second floor wanghui0380 response:

https://www.nuget.org/packages/System.Linq.Dynamic/https://eval-expression.net/

Is now cited the dymamic linq, it is not too understand principle

Principle there is no need to dig into the, do you want to get him, is equal to your college "compiler principle" back again, I can only say that he is lexical analysis, token trees, visitors perform

Maybe you can hit halfway, don't walk that far, just see "custom linq provider"
  •  Tags:  
  • C#
  • Related