我正在尝试从特定经理那里检索员工列表。我首先找到经理班次,然后找到该班次的经理列表。第三个查询需要检索属于该经理列表的所有员工。我不知道出了什么问题,但我没有得到任何结果。我感谢您的帮助
//Determine shift of current user
int shiftId = (from s in db.webpages_UsersInRoles
where s.UserId == userId
select s.ShiftId).Single();
var ManagerId = (from g in db.tblManager
where g.ShiftId == shiftId
select g.UserID).ToList();
var employees = (from e in db.tblEmployee
where ManagerId.Contains(e.ShiftId.Value)
select e).ToList();