how do use join query of entities framework
there are two table in the sql,EmployeeCategory And EmployeeStatus, i want a join query that 1st check from employee category table employee category then from employeeStatus table the employee status, in employeestatus table there are multiple records against same employee ,i want to get last one.

Pankaj Kumar ChoudharyPosted Mar 19, 2015, 1:00 AM
select* from EmployeeCategory
left outer join
(select * from
(select Distinct * from EmployeeStatus)Temp)Red
on
EmployeeCategory.id=Red.id
in this query
(select Distinct * from EmployeeStatus)Temp will select distinct data from table and named as Temp. Now you can use join on this table with a name(Here i give a name 'Red')
Syed ShanuPosted Mar 19, 2015, 12:57 AM