title: Linq query to get list inside list
body: <p>Below is the query, </p>
  
  <pre><code>List&lt;int&gt; groupIdList = {1, 2};
  
  var clientGroupData = from cge in base.context.Set&lt;ClientGroupEngagement&gt;()
                        join cg in base.context.Set&lt;ClientGroup&gt;() on cge.ClientGroupID equals cg.ClientGroupID
                        join cgu in base.context.Set&lt;ClientGroupUser&gt;() on cg.ClientGroupID equals cgu.ClientGroupID
                        join eng in base.context.Set&lt;Engagement&gt;() on cge.EngagementID equals eng.EngagementID
                        join cdc in base.context.Set&lt;CountryDataCenter&gt;()
                        on new { eng.CountryID, eng.EngagementVersion } equals new { cdc.CountryID, cdc.EngagementVersion }
                        join dc in base.context.Set&lt;DataCenter&gt;()
                        on cdc.DataCenterID equals dc.DataCenterID
                        join dcuri in base.context.Set&lt;DataCenterURI&gt;()
                        on new { dc.DataCenterID, cdc.EngagementVersion } equals new { dcuri.DataCenterID, dcuri.EngagementVersion }
                        join uritype in base.context.Set&lt;URIType&gt;()
                        on dcuri.URITypeID equals uritype.URITypeID
                        where groupIdList.Contains(cgu.ClientGroupID)
                              &amp;&amp; cg.IsActive
                              &amp;&amp; cdc.IsActive
                              &amp;&amp; dc.IsActive
                              &amp;&amp; dcuri.IsActive
                              &amp;&amp; uritype.IsActive
                              &amp;&amp; (dcuri.URITypeID == (int)URITypeEnum.WebUri || dcuri.URITypeID == (int)URITypeEnum.AppUri)
                        select new ClientGroupUserEngagementModel
                        {
                            EngagementId = cge.EngagementID,
                            EngagementDescription = eng.EngagementDescription,
                            EngagementStatusId = eng.EngagementStatusID,
                            ClientGroupId = cg.ClientGroupID,
                            ClientGroupGuid = cg.ClientGroupGUID,
                            ClientGroupName = cg.ClientGroupName,
                            UserId = cgu.ClientUserID,
                            FirstName = cgu.FirstName,
                            LastName = cgu.LastName,
                            IsGroupUserActive = cgu.IsActive,
                            LocatorDataModel = new LocatorDataModel
                            {
                                DatacenterId = cdc.DataCenterID,
                                DatacenterName = dc.DataCenterName,
                                EngagementVersion = cdc.EngagementVersion,
                                Uri = dcuri.URI,
                                UriTypeId = dcuri.URITypeID
                            },
                        };
  
  var result = await clientGroupData.ToListAsync();
  </code></pre>
  
  <p>I am expecting list of <code>LocatorDataModel</code> in the result set. <code>EngagementId</code> is key which will be unique.</p>
  
  <p>Currently it is pulling *2 records due to condition </p>
  
  <pre><code>(dcuri.URITypeID == (int)URITypeEnum.WebUri || dcuri.URITypeID == (int)URITypeEnum.AppUri)
  </code></pre>
  
  <p>How can get result like </p>
  
  <pre><code>Engagementid 1 : dataurl1 dataurl2
  Engagementid 2: dataurl3 dataurl4, dataurl5
  </code></pre>
  
  <p>etc.</p>
  
  <p>Any help is appreciated.</p>