鉴于以下查询
public TrainingListViewModel(List<int> employeeIdList)
{
this.EmployeeOtherLeaveItemList =
CacheObjects.AllEmployeeOtherLeaves
.Where(x => x.OtherLeaveDate >= Utility.GetToday() &&
x.CancelDate.HasValue == false &&
x.OtherLeaveId == Constants.TrainingId)
.OrderBy(x => x.OtherLeaveDate)
.Select(x => new EmployeeOtherLeaveItem
{
EmployeeOtherLeave = x,
SelectedFlag = false
}).ToList();
}
我想将employeeIdList 放入查询中。我想检索所有 x.OtherLeaveDate 值,其中每个连接都存在相同的 x.OtherLeaveDate 其中 x.EmployeeId = (int employeeId in employeeIdList)
例如,如果在 employeeIdList 和 CacheObjects.AllEmployeeOtherLeaves 集合中有 EmployeeIds 1、2、3,则所有 3 名员工的日期都是 2001 年 1 月 1 日,然后检索该日期。