Hello Friends,
In my database, I have a colum Salary with numeric(18,0)
I want to write code for getting total employee salary
For example; select couunt(*) from Employee
select Department,count(*) from Employee group by Department
Here I wrote;
- var count = db.Employees.Count(x => Convert.ToBoolean(x.Salary));
But,Im getting error. please help me to solve

ali tuncerRank #1,499 · 1.1K reputationPosted May 16, 2016, 8:20 PM EDT
select Department,count(*) from Employee will give you total employee number, not sum of salary..
Mansi Gupta67 reputationPosted May 18, 2016, 2:20 AM EDT