Click here to Skip to main content
15,881,803 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more:
I have this query below:

C#
var q = from row in DataAccess.metadata.db_Employee
                        where row.QuestionsSubmitted == true
                        select new bl_AdminDashboard
                        {
                            monthX = row.employeeID,

                        };


I need to be able to count number of these ID's but I dont have the Count()
Posted

1 solution

hope you are expecting..
C#
int count = (from row in DataAccess.metadata.db_Employee
                        where row.QuestionsSubmitted == true
                        select new bl_AdminDashboard
                        {
                            monthX = row.employeeID,

                        }).ToList<bl_AdminDashboard>().Count();
 
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