princesszea
Technical User
Hi,
I need to get the sum of employees scores for each department using linq. I only need scores from departments that have more than 20 employees but not sure Where to put the Where clause also not sure if the query below is correct
Many thanks
I need to get the sum of employees scores for each department using linq. I only need scores from departments that have more than 20 employees but not sure Where to put the Where clause also not sure if the query below is correct
Code:
var departmentquery = from row in dt.AsEnumerable()
group row by row["department"] into grp
select new
{
Sum = grp.Sum(r => r.Field<decimal>("score");
};