I need some data aggregated by age range, something like:
Age | Members
------------------
0-13 | 150
14-19 | 250
20-30 | 400
In my linq query I'm using EntityFunctions.DiffYears to get age based on birth date:
let age = EntityFunctions.DiffYears(contact.Birthday, today)
however if I group group by the age field I will get 19,20,21... and not the ranges. What is the recommended way to acomplish this with linq and entity framework?