Advertisement
Guest User

Untitled

a guest
Oct 31st, 2016
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.46 KB | None | 0 0
  1. IEnumerable<Department> departments = context
  2.     .Departments.Where(department => department.Employees.Count > 5)
  3.     .OrderBy(department => department.Employees.Count);
  4. foreach (Department department in departments)
  5. {
  6.     content.AppendLine($"{department.Name} {department.Employee.FirstName}");
  7.     foreach (Employee employee in department.Employees)
  8.     {
  9.         content.AppendLine($"{employee.FirstName} {employee.LastName} {employee.JobTitle}");
  10.     }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement