bmanmike39
asked on
How do you get the count of records in a db with Entity 4
I'm trying to get the count of the total number of departments in my db. but I don't know how to do this with entity. below is what I have and I'm stuck.
Code for button click event:
Sample of what I'm Trying to do with Entity:
Code for button click event:
OrgEntities OE = new OrgEntities();
tbl_Dept d = OE.tbl_Dept.Count()
Lbl_deptCount.text = d.ToString();
Sample of what I'm Trying to do with Entity:
SELECT * FROM tbl_Dept WHERE Did = 2
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Not a problem bmanmike39, glad I could help.
ASKER