
Dim g = lst.Data.GroupBy(Function(T) New With { T.mname,T.munit,T.mPrice }).Select(Function(t) New With { .mname = t.Key.mname,.mPrice = t.Key.mPrice,.munit = t.Key.munit,.mValue = t.Sum(Function(i) i.mValue) })
c#版本对照
{ var g = lst.Data.GroupBy(T => new { T.mname,T.mPrice }).Select(t => new { mname = t.Key.mname,mPrice = t.Key.mPrice,munit = t.Key.munit,mValue = t.Sum(i => i.mValue) });}总结
以上是内存溢出为你收集整理的Ef数据GroupBy多字段查询Vb.net与c#参考全部内容,希望文章能够帮你解决Ef数据GroupBy多字段查询Vb.net与c#参考所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)