how to count column values in c#.net
i have a table called temp,in that table i have a records like below
| empid | name | dept | 1 | 2 | 3 | 4 | 5 |
| 1 | a | C | X | WH | / | X | X |
| 2 | b | C | X | WH | X | / | / |
| 3 | c | C | X | WH | / | / | X |
how to achieve this task in C#.net
my expected result is
empid
| empid | name | dept | 1 | 2 | 3 | 4 | 5 | total X | total / |
| 1 | a | c | x | wh | / | x | x | 3 | 1 |
| 2 | b | c | x | wh | x | / | / | 2 | 2 |
| 3 | c | c | x | wh | / | / | x | 2 | 2 |