0
enter image description here我對分組和suming列此代碼:Linq的分組和數據表塞汀
var groupedData = from b in showit.AsEnumerable()
group b by b.Field<string>("Key") into g
select new
{
KeyName = g.Key,
Calls_Chats_Answered = g.Sum(x => x.Field<int>("Calls_Chats_Answered"))
};
如何通過groupedData
到數據表?
這些鏈接之一的可能重複:1的最佳實踐:將LINQ查詢結果不循環的DataTable(http://stackoverflow.com/questions/4460654/best-practice-convert-linq -query-result-to-a-datatable-without-looping) – har07
2. [如何將此LINQ查詢結果轉換回DataTable對象?](http://stackoverflow.com/questions/19143278/how-to-convert -this-linq-query-result-back-to-datatable-object) – har07
應該在哪裏顯示分組數據?圖像沒有更清晰。 –