I have a stored procedure that is returning data in this format:
EmployeeID | DepartmentID
---------------------
1 | 1
2 | 1
3 | 2
4 | 4
5 | 4
I'm getting the results like so:
List<spResult> results = DataContext.sp().ToList();
I'd like to get a list of Employees for a certain Department, based on the data returned from the stored procedure. Something like:
int departmentId = 1;
List<Employee> employees = (from e in DataContext.Employees
//where...
select e).ToList();
How do I format my where clause to get the EmployeeIDs from the result set that have the given DepartmentID?