groupby not allow include
Posted
by user276640
on Stack Overflow
See other posts from Stack Overflow
or by user276640
Published on 2010-03-19T11:59:18Z
Indexed on
2010/03/19
12:01 UTC
Read the original article
Hit count: 317
i use such code
_dataContext.Invoice.Include("Projects").Where(i => i.Paid == true).GroupBy(i => i.Projects.Id).OrderBy(grouping => grouping.Max(i => i.Projects.Id)).Take(3);
but object Projects is null, but another code is working
_dataContext.Invoice.Include("Projects").OrderBy(i => i.DateCreated).ToList();
what the problem?
© Stack Overflow or respective owner