title: Can I combine two Linq calls when they use different syntax?
body: <p>I have the following code. The function has a lot of Linq calls and I had help on putting this into place. </p>
  
  <pre><code>    public IList&lt;Content.Grid&gt; Details(string pk)
      {
          IEnumerable&lt;Content.Grid&gt; details = null;
          IList&lt;Content.Grid&gt; detailsList = null;
          var data = _contentRepository.GetPk(pk);
          var refType = this.GetRefType(pk);
          var refStat = this.GetRefStat(pk);
          var type = _referenceRepository.GetPk(refType);
          var stat = _referenceRepository.GetPk(refStat);
          details =
          from d in data
          join s in stat on d.Status equals s.RowKey into statuses
          from s in statuses.DefaultIfEmpty()
          join t in type on d.Type equals t.RowKey into types
          from t in types.DefaultIfEmpty()
          select new Content.Grid
          {
              PartitionKey = d.PartitionKey,
              RowKey = d.RowKey,
              Order = d.Order,
              Title = d.Title,
              Status = s == null ? null : s.Value,
              StatusKey = d.Status,
              Type = t == null ? null : t.Value,
              TypeKey = d.Type,
              Link = d.Link,
              Notes = d.Notes,
              TextLength = d.TextLength
          };
          detailsList = details
                  .OrderBy(item =&gt; item.Order)
                  .ThenBy(item =&gt; item.Title)
                  .Select((t, index) =&gt; new Content.Grid()
                  {
                      PartitionKey = t.PartitionKey,
                      RowKey = t.RowKey,
                      Row = index + 1,
                      Order = t.Order,
                      Title = t.Title,
                      Status = t.Status,
                      StatusKey = t.StatusKey,
                      Type = t.Type,
                      TypeKey = t.TypeKey,
                      Link = t.Link,
                      Notes = t.Notes,
                      TextLength = t.TextLength,
  
                  })
                   .ToList();
          return detailsList;
  
      }
  </code></pre>
  
  <p>The first uses one format for Linq and the second another. Is there some way that I could simplify and/or combine these? I would really like to make this code simpler but I am not sure how to do this. Any suggestions would be much appreciated.</p>