Example #1
0
 public IEnumerable <EmployeeDTO> GetEmployeesByTeamID(int id)
 {
     return(dbm.FindAllEmployeeTeams(true)
            .Where(x => x.Team.TeamID == id)
            .SelectMany(x => dbm.FindAllEmployees(true)
                        .Where(y => x.Employee.EmployeeID == y.EmployeeID))
            .Distinct()
            .Select(x => converter.EmployeeToDTO(x))
            .ToList());
 }
Example #2
0
 public IEnumerable <EmployeeDTO> GetEmployees()
 {
     return(dbm.FindAllEmployees(true).Select(x => converter.EmployeeToDTO(x)).ToList());
 }