This question is locked. New answers and comments are not allowed.
I have a table with Employees. It has First Name, Last Name, Enabled columns. This Employees table has a one-to-many relationship with the Comapny table (Many employees to one company).
How do I retrieve the number of employees that have Enabled set to true and the number of employees that have Enabled set to false? The count retrieved should be for a particular company.
I can retrive the total number of employees using the following:
I am new to ORMs in general as well as LINQ and OQL so I am unsure of the best way to do it.
How do I retrieve the number of employees that have Enabled set to true and the number of employees that have Enabled set to false? The count retrieved should be for a particular company.
I can retrive the total number of employees using the following:
lblTotalEmployees.Text = ((Company)scope.GetObjectById(Database.OID.ParseObjectId(typeof(Company), Profile.CompanyID.ToString()))).Employees.Count.ToString(); |
I am new to ORMs in general as well as LINQ and OQL so I am unsure of the best way to do it.