Click here to Skip to main content
15,849,328 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hai
i want to display the count of number of employees by department wise.
with that count i want to display the total table information based on department
like totalnoofvisitors visitorname companyname(these are columns) i want like this i was write a query like below
C#
var x = from u in db.Appointment group u  by u.VisitingDepartmentName  into g select new { VisitingDepartmentName = g.Key,
                                                                                                                  TotalNoofVisitors = g.Count(),
                                                                                                                // TotalNoofVisitors=g==null ? 0:g.Count(),
                                                                                                                 Records = g
                       };




this query gives count is zero and gives the information whosedepartmentname is zero
please help me
Posted
Updated 3-Sep-15 20:35pm
v2

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