哪一个更好?为什么?
CurrentCustomer.Company.Employees.Select(x=>x.Name);
或者 :
CurrentCustomer.GetCompanyEmployeeNames();
其他示例:
CurrentCustomer.Company.Employees.where(x=>x.Post==EmpPosts.Manager).Select(x=>x.Name);
或者 :
CurrentCustomer.GetCompanyManagerNames();
//And Comany has :
//GetManagerEmployeeNames();
//And Employee has
//GetManagerNames(); And GetEmployeeNames(); methods
...