Update (based on relation):
select new
{
Time = l.PeriodEndUtc,
Stat1 = (from s in l.ApplianceStatistics
where s.ApplianceStatisticNameId == 2
select s.Value
).ToList(),
Stat2 = (from s in l.ApplianceStatistics
where s.ApplianceStatisticNameId == 3
select s.Value
).ToList()
}
Try:
select new
{
Time = l.PeriodEndUtc,
Stat1 = (from s in ApplianceStatistics
where s.ApplianceStatisticsLogId == l.ApplianceStatisticsLogId
&& s.ApplianceStatisticNameId == 2
select s.Value
).ToList(),
Stat2 = (from s in ApplianceStatistics
where s.ApplianceStatisticsLogId == l.ApplianceStatisticsLogId
&& s.ApplianceStatisticNameId == 3
select s.Value
).ToList()
}
eglasius
2009-04-10 22:28:39