この SQL クエリを LINQ 式に変換するにはどうすればよいですか?
select NoteDate, SUM( DurationInHours ) from Note
where IDUser = '2933FB9C-CC61-46DA-916D-57B0D5EF4803' and
NoteDate > '2013-07-01'
group by NoteDate
やってみたけどダメだった
var lastMonth = DateTime.Today.AddMonths(-1);
var userNotes = GetNotesByUser(idUser);
var b = from note in userNotes
group note by new {note.IDUser, note.NoteDate, note.DurationInHours} into g
where g.Key.NoteDate > lastMonth
select new {g.Key.NoteDate, TotalHours = g.Sum(a => a.DurationInHours)}