zoukankan      html  css  js  c++  java
  • List 与 table 分组(group by )

    1.list 分组

    List<ADSPkgMasterInfo> packageList= BizUIRequestAssetTag.GetUIRequestAsset_Rel_PackageNameInfo(_UIRequestID, _isDraft);
            var aa = from item in packageList
                     group item by new { item.PkgName, item.PkgMasterID } into g
                     select new
                     {
                         PkgName = g.Key.PkgName,
                         PkgMasterID = g.Key.PkgMasterID
                     };

    2.table 分组

    var Query = from t in dtACCQueryInfo.AsEnumerable()
                            group t by new
                            {
                                s = t.Field<string>("SenseVersion"),
                                d = t.Field<string>("Device"),
                                a = t.Field<string>("APName"),
                                fn = t.Field<string>("OwnerName"),
                                Fd = t.Field<string>("CodeFreezeDate")
                            }
                                into m
                                select new
                                {
                                    SenseVersion = m.Key.s,
                                    Device = m.Key.d,
                                    APName = m.Key.a,
                                    OwnerName = m.Key.fn,
                                    CodeFreezeDate = m.Key.Fd,
                                    count = m.Count()
                                };

  • 相关阅读:
    读GNU官方的Make manual
    GNU LD之一LMA和VMA
    GNU LD之二LD script
    gcc 库的链接顺序问题
    GDB远程连接RX Probe在线debug程序
    mips gnu工具使用
    read PSE TPS2384 POE Firmware Guide
    adult道具项目开发
    2、与网络相关的命令 netstat , tcpdump 等。
    1、与 CPU、 内存、 磁盘相关的命令
  • 原文地址:https://www.cnblogs.com/gracexy/p/4788951.html
Copyright © 2011-2022 走看看