久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    1. <small id='RHdnk'></small><noframes id='RHdnk'>

        <bdo id='RHdnk'></bdo><ul id='RHdnk'></ul>
      <legend id='RHdnk'><style id='RHdnk'><dir id='RHdnk'><q id='RHdnk'></q></dir></style></legend>

        <i id='RHdnk'><tr id='RHdnk'><dt id='RHdnk'><q id='RHdnk'><span id='RHdnk'><b id='RHdnk'><form id='RHdnk'><ins id='RHdnk'></ins><ul id='RHdnk'></ul><sub id='RHdnk'></sub></form><legend id='RHdnk'></legend><bdo id='RHdnk'><pre id='RHdnk'><center id='RHdnk'></center></pre></bdo></b><th id='RHdnk'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='RHdnk'><tfoot id='RHdnk'></tfoot><dl id='RHdnk'><fieldset id='RHdnk'></fieldset></dl></div>

        <tfoot id='RHdnk'></tfoot>
      1. 使用 SUM 和 ORDER BY 進行 Linq 查詢

        Linq Query with SUM and ORDER BY(使用 SUM 和 ORDER BY 進行 Linq 查詢)
          <i id='qTha8'><tr id='qTha8'><dt id='qTha8'><q id='qTha8'><span id='qTha8'><b id='qTha8'><form id='qTha8'><ins id='qTha8'></ins><ul id='qTha8'></ul><sub id='qTha8'></sub></form><legend id='qTha8'></legend><bdo id='qTha8'><pre id='qTha8'><center id='qTha8'></center></pre></bdo></b><th id='qTha8'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='qTha8'><tfoot id='qTha8'></tfoot><dl id='qTha8'><fieldset id='qTha8'></fieldset></dl></div>

          <legend id='qTha8'><style id='qTha8'><dir id='qTha8'><q id='qTha8'></q></dir></style></legend>

          <tfoot id='qTha8'></tfoot>

          <small id='qTha8'></small><noframes id='qTha8'>

                <tbody id='qTha8'></tbody>
              • <bdo id='qTha8'></bdo><ul id='qTha8'></ul>

                1. 本文介紹了使用 SUM 和 ORDER BY 進行 Linq 查詢的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我有一個名為 Hit 的 (C#) 類,它具有 ItemID (int) 和 Score (int) 屬性.我跳過其余的細節以保持簡短.現在在我的代碼中,我有一個巨大的列表,我需要在該列表上執行以下選擇(進入一個新列表):我需要為每個單獨的 Hit.ItemID 獲取所有 Hit.Score 的總和,按分數排序.所以如果我在原始列表中有以下項目

                  I have a (C#) class called Hit with an ItemID (int) and a Score (int) property. I skip the rest of the details to keep it short. Now in my code, I have a huge List on which I need to do the following select (into a new List): I need to get the sum of all Hit.Score's for each individual Hit.ItemID, ordered by Score. So if I have the following items in the original list

                  ItemID=3, Score=5
                  ItemID=1, Score=5
                  ItemID=2, Score=5
                  ItemID=3, Score=1
                  ItemID=1, Score=8
                  ItemID=2, Score=10
                  

                  結果列表應包含以下內容:

                  the resulting List should contain the following:

                  ItemID=2, Score=15
                  ItemID=1, Score=13
                  ItemID=3, Score=6
                  

                  有人可以幫忙嗎?

                  推薦答案

                  var q = (from h in hits
                      group h by new { h.ItemID } into hh
                      select new {
                          hh.Key.ItemID,
                          Score = hh.Sum(s => s.Score)
                      }).OrderByDescending(i => i.Score);
                  

                  這篇關于使用 SUM 和 ORDER BY 進行 Linq 查詢的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  What are good algorithms for vehicle license plate detection?(車牌檢測有哪些好的算法?)
                  onClick event for Image in Unity(Unity中圖像的onClick事件)
                  Running Total C#(運行總 C#)
                  Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時刪除目錄)
                  asp.net listview highlight row on click(asp.net listview 在單擊時突出顯示行)
                  Calling A Button OnClick from a function(從函數調用按鈕 OnClick)
                  <legend id='XZ5J2'><style id='XZ5J2'><dir id='XZ5J2'><q id='XZ5J2'></q></dir></style></legend>

                  <tfoot id='XZ5J2'></tfoot>

                      <tbody id='XZ5J2'></tbody>
                  1. <i id='XZ5J2'><tr id='XZ5J2'><dt id='XZ5J2'><q id='XZ5J2'><span id='XZ5J2'><b id='XZ5J2'><form id='XZ5J2'><ins id='XZ5J2'></ins><ul id='XZ5J2'></ul><sub id='XZ5J2'></sub></form><legend id='XZ5J2'></legend><bdo id='XZ5J2'><pre id='XZ5J2'><center id='XZ5J2'></center></pre></bdo></b><th id='XZ5J2'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='XZ5J2'><tfoot id='XZ5J2'></tfoot><dl id='XZ5J2'><fieldset id='XZ5J2'></fieldset></dl></div>
                          • <bdo id='XZ5J2'></bdo><ul id='XZ5J2'></ul>
                          • <small id='XZ5J2'></small><noframes id='XZ5J2'>

                            主站蜘蛛池模板: 日韩国产一区二区三区 | 色综合99 | 国产精品久久久久久久久久软件 | 欧美日韩亚洲一区二区 | 亚洲精品电影网在线观看 | 欧美亚洲国产日韩 | 日韩成人高清在线 | 成人在线小视频 | 国内自拍真实伦在线观看 | 成人免费网视频 | 欧美久久久网站 | 久久国产电影 | 国产99精品| 欧美日韩综合一区 | 色婷婷综合成人av | 国产专区在线 | 国产黄色网址在线观看 | 91久久视频 | 中文字幕一区二区三区在线观看 | 亚洲精品一 | 毛片一区二区三区 | 99精品欧美一区二区蜜桃免费 | 日本在线一区二区三区 | 最新国产精品 | 国产日韩欧美在线观看 | 国产午夜精品久久久 | 日韩精品一区二区三区在线播放 | av在线播放一区二区 | 成人精品一区二区 | 国产精品免费一区二区 | 久草视频在线播放 | 久久大陆 | 亚洲国产一区视频 | 国产精品久久久亚洲 | 日韩精品999 | 一区二区在线不卡 | 国产在线视频一区 | 午夜在线精品 | 欧美另类视频 | 久久久www成人免费无遮挡大片 | 一区二区三区在线观看免费视频 |