This question is locked. New answers and comments are not allowed.
I can not get this query to execute properly through ORM. I constantly get Object reference not set no matter how I modify the query. Here is my latest approach, which works fine in LinqPad, but not in ORM.
I expect a list of items which contains a division id, and a list of teams for that division.
Thanks,
Joe
var test = from sdt
in
DataContext.SeasonDivisionTeams
join team
in
DataContext.Teams on sdt.TeamID equals team.Id into j1
from loj
in
j1.DefaultIfEmpty()
group loj by
new
{
sdt.DivisionID
}
into cag
select
new
{
cag.Key,
cag = from temp
in
cag
select temp
};
I expect a list of items which contains a division id, and a list of teams for that division.
Thanks,
Joe