what about something simpler like this?
var res2 = from i in invitations
group i by o.User into g
select new {g.Key.Id, amount = g.Sum(i => i.Amount)};
El 19 de febrero de 2011 00:43, Juan Pablo Romero Méndez <
[email protected]> escribió:
> var res2 = from u in users
> join i in invitations on u.Id equals i.UserInfo.Id
> select new {u.Id, i} into o
> group o by o.Id into v
> select new {v.Key, amount = v.Sum(x => x.i.Amount)};
>
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.