以下のクエリを考えると
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.EmployeeId = (int employeeId in employeeIdList) の結合ごとに同じ x.OtherLeaveDate が存在するすべての x.OtherLeaveDate 値を取得したい
たとえば、employeeIdList と CacheObjects.AllEmployeeOtherLeaves コレクションに EmployeeIds 1、2、3 がある場合、3 人の従業員全員に対して 2001 年 1 月 1 日の日付があり、その日付を取得します。