I have two tables emp_details
where i have emp_id
, emp_name
and emp_addresss
as columns and another table emp_hierarcy
where i have emp_id
, emp_mgid
with multiple rows with same emp_id
.
I want to write a linq query i.e, to join two table upon emp_id
with distinct emp_id in emp_hierarcy
. I know how to join tables in sqlserver and i have return this query in sqlserver
SELECT
DISTINCT
eh.emp_id
FROM
emp_details ed
LEFT OUTER JOIN emp_hierarcy eh ON ed.emp_id = eh.emp_id
i'm able to print only emp_id
how to get all the details in LINQ query ?
Alternatively you can try,