本文介绍了LINQ VB.NET语法帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一直在尝试用VB编写此代码段,有人可以看到它的问题吗?我在第5行收到错误消息.
谢谢.
Hi, I've been trying to write this snippet of code in VB, can anyone see what is wrong with it? I am recieving an error on line 5.
Thanks.
Dim a1 = From rows In db.tPDMLinkUsages _
Where (rows.ACCESSDATE >= DateTime.Today.AddDays(-90)) _
Select New With _
{ _
.ORGANIZATION = db.vWindchillUsers.Single(Function(v) v.USERNAME = rows.USERNAME), _
.ACCESSDATE = rows.ACCESSDATE _
}
Dim a2 = From rows In a1 _
Group rows By u.ORGANIZATION Into uGroup _
Select New With _
{ _
.ORGANIZATION = uGroup.Key, _
.AVERAGEDAILY = uGroup.Count() / 90.0, _
.HIGHWATER= uGroup.GroupBy(Function(v) v.ACCESSDATE).Max(Function(g) g.Count())
推荐答案
这篇关于LINQ VB.NET语法帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!