任何人都可以为以下 C# linq 查询提供 vb.net 等效查询吗
var res= from volunteer in dtavailableVolunteers
group volunteer by volunteer.Id into g
let volunteerDates = g.Select(groupedElement=>groupedElement.date)
where arr.All(date=>volunteerDates.Contains(date))
select g.Key
我写了下面的查询,但它抛出“重载解析失败,因为无法使用这些参数调用可访问的“选择””异常
Dim dr As DataRow() = From item In dtavailableVolunteers.AsEnumerable() _
Group item By item.VolunteerId Into g = Group
Let volunteerDates = g.[Select](Function(groupedElement) groupedElement.Field("SelectedDate")) _
Where SelectedDatesArray.All(Function([SelectedDate]) volunteerDates.Contains([SelectedDate])) Select g