I have a table which has codes and is linked with a table of employees by an xref. I want to filter the results based on the linked table’s ID property. I can’t seem to get the predicate correct, what am I doing incorrectly?
public static IQueryable<TblProjCd> ByEmployeeId(this IQueryable<TblProjCd> qry, int employeeId)
{
//Return the filtered IQueryable object
return from q in qry
where q.TblEmployee.ToList().FindAll(p => p.EmployeeId == employeeId)
select q;
}
Do you by chance mean: