Click here to Skip to main content
15,887,477 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
select Stage, COUNT(*) from HealthyMap Where Section = '" + cmbSectionGPA.text + "' GROUP BY Stage"

I Want Convert This Query To Lambda
Please Help Me
Regards
Yarian

What I have tried:

Helping To Convert Query To Lambda In C#
Posted
Updated 15-Aug-16 20:56pm

1 solution

C#
var result = YourList.Where(k => k.Section == cmbSectionGPA.text).GroupBy(k => k.Stage).Select(grp => new { Stage = grp.Key, Count = grp.Count() }).ToList();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900