Ef数据GroupBy多字段查询Vb.net与c#参考

Ef数据GroupBy多字段查询Vb.net与c#参考,第1张

概述Dim g = lst.Data.GroupBy(Function(T) New With { T.mName, T.mUnit,
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#参考所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/1253226.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-06-07
下一篇2022-06-07

发表评论

登录后才能评论

评论列表(0条)

    保存