私はほぼ100万のデータを持っていますが、それらすべてをメモリにクエリしてグループ化することは絶対にしたくないので、これを試しましたが、linq2Entityはstring.join()、IEnumerable.toList()などを認識しませんもの
var capaHrs = (
from newsPerHr in _dbRawDataContext.CapacityPerHours
where newsPerHr.StreamDT >= this.BeginDateTime
&& newsPerHr.StreamDT < this.EndDateTime
&& newsPerHr.ServerName == this.ServerName
group newsPerHr by newsPerHr.StreamDT into grp
let MsgSizeTotal = (from i in grp select i.MsgSize).Sum(x => (int)x)
let MNumber = (from i in grp select i.MsgNumber).Sum(x => (int)x)
let Feeds = (from i in grp select i.FeedName).ToArray()
select new
{
ServerName = ServerName,
FeedName = Feeds,
StreamDT = grp.Key,
MsgSize = MsgSizeTotal,
MsgNumber = MNumber
}).ToList();
_capacityData = capaHrs.Select(x => new CapacityPerHour {
ServerName = x.ServerName,
FeedName = string.Join(", ",x.FeedName),
StreamDT = x.StreamDT,
MsgSize = x.MsgSize,
MsgNumber = x.MsgNumber
}).ToList();
それを機能させる方法は?