EmployeeId Name ManagerId
------------------------------
1 A null
2 B null
3 C 1
4 D 3
5 E 2
just using this table, how can a linq query (using linq to sql) be written to fetch the parent data recursively.
For instance if the Employer Id selected is 4 it should give list of employees with Id: 4, 3, 1
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…