[Fact]
private void TestX()
{
var Query= GetEmpListData("PPM100");
var Result= Query.Select(x => x.Emplid).Distinct().ToList();
}
private List<Employee> GetEmpListData(string DepartmentCode)
{
using (EmpDContext db = new EmpDContext())
{
var Query = db.Employee.Where(a => a.SuperiorDept == DepartmentCode).ToList();
return Query.Concat(Query.SelectMany(t => GetData(t.DeptCode))).ToList();
}
}