I've a in memory collection of employees, Its a list of employees, i.e.var employeeMapingList = employeeMapping.AsEnumerable();
I'm trying to write this query ->
employees = (from emp in employees
join x in employeeMapingList on emp.Emp_ID equals x.Map_To_Emp_Id
join y in employeeMapingList on emp.Dept_ID equals y.Dept_ID
where ((x.Map_To_Emp_Id == emp.Emp_ID && x.DataSource == emp.Data_Source)||
(y.Emp_Id == emp.Emp_ID && y.DataSource == emp.Data_Source)
)
select emp);
I'm getting following error => Unable to create a constant value of type 'XXX'. Only primitive types or enumeration types are supported in this context.
Appreciate your help in advance !