Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IEnumerable<Department> departments = context
- .Departments.Where(department => department.Employees.Count > 5)
- .OrderBy(department => department.Employees.Count);
- foreach (Department department in departments)
- {
- content.AppendLine($"{department.Name} {department.Employee.FirstName}");
- foreach (Employee employee in department.Employees)
- {
- content.AppendLine($"{employee.FirstName} {employee.LastName} {employee.JobTitle}");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement