version 2.6 (v2.0.50727)
I have an Group table with a ParentGroupID column (allows nulls). When I am projecting, I am trying to dig three levels deep, but for some reason, the very last level is always the level below it. for example, zone and region always have the same ids. Any ideas?
Also, we are not permitted here to upgrade to version 3.0 yet.
Thanks!
var instances =
(from i in MetaData.ProcessRoundIssueInstance
where i.Active && i.IsComplete && i.ProcessRound.ProcessContest.Active
&& (i.ProcessRound.ProcessContest.BeginDate <= date && i.ProcessRound.ProcessContest.EndDate >= date)
select new SubmissionDTO
{
ProcessRoundIssueInstanceID = i.ProcessRoundIssueInstanceID,
ProcessRoundTypeId = i.ProcessRound.ProcessRoundTypeID,
TransactionId = i.TransactionID,
Amount = i.Transaction.Quantity,
BAC = i.GroupID.GetValueOrDefault(),
District = i.Group.ParentGroupID.GetValueOrDefault(),
Zone = i.Group.Group.ParentGroupID.GetValueOrDefault(),
Region = i.Group.Group.Group.ParentGroupID.GetValueOrDefault()
}).ToList();