g.S um (item=& gt; Item. Is_done? 1-0)
Lambda expressions, and need to do a group summary, but Is_done bool, how to use the ternary operator, consult everybody
CodePudding user response:
Above the code error directlyCodePudding user response:
Not checked twice?The number and the number of false Is_done to true
CodePudding user response:
It won't error, if is your Is_done bool type,CodePudding user response:
Right to mount (item=& gt; Item. Is_done)Don't you is to be the number of true results
CodePudding user response:
This have to ask you is what, such as EF, he can't explain, for example the list he can explainAre linq IQueryable but points, IEnumerable
Dojo.provide is IQueryable but points
So, there is no preface, and I have no language, after this problem didn't show the premise, we are unable to answer
CodePudding user response:
Try this twoG.S um (item=& gt; The Convert. ToInt32 (item. Is_done));
Right to mount (item=& gt; Item. Is_done==true);
CodePudding user response:
G.S well (item=& gt; Item. Is_done? 1-0). The Sum ()Or
Right to mount (x=& gt; X.I sDone)
CodePudding user response:
G.S well (item=& gt; Item. Is_done? 1-0). The Sum ()Or
Right to mount (x=& gt; X.I sDone)
I collect the