This is a fairly simple example that does what say that you need
int[] ids = {1, 4, 5, 9};
var deptList = ids.Select(n => n);
var result = from e in Employees
where (deptList.Contains(e.deptid)
select (e.LastName);
I have tested this against the Northwind database sample using
e.EmployeeID
instead of
e.DeptID
but that should make no difference to the outcome.