title: string.Join in Linq to Entity queries
body: <p>I'm currently shifting my data access code from L2S to Entity framework db first. I have problem with queries like following</p>
  
  <pre><code>var emps = (from emp in DataContext.setupEmployees
                         let contacts = DataContext.setupContacts.Where(x =&gt; x.EmployeeID == emp.EmployeeID).Select(x =&gt; x.Contact)
                         select new 
                         {
                             EmployeeName = emp.EmployeeName,
                             Contacts = string.Join(", ", contacts.ToArray())
                         }).ToList();
  </code></pre>
  
  <p>EF tells me it can't convert the method <code>string.join</code> into stored expression. One obvious work-around is to bring the objects in memory (ToList, AsEnumerable etc) and then call <code>string.Join</code> method like</p>
  
  <pre><code>var emps = (from emp in DataContext.setupEmployees
                         let contacts = DataContext.setupContacts.Where(x =&gt; x.EmployeeID == emp.EmployeeID).Select(x =&gt; x.Contact)
                         select new 
                         {
                             EmployeeName = emp.EmployeeName,
                             Contacts = contacts
                         }).ToList().Select(x=&gt;new{
                              x.EmployeeName,
                              Contacts = string.Join(", ",x.Contacts)
                         });
  </code></pre>
  
  <p>This solution works perfectly but it's just that it's more verbose and I'd have to duplicate select clause in lots of queries that used to work fine in L2S.</p>
  
  <p><strong>My question:</strong> is there any way I can avoid writing this <code>ToList</code> thing and call <code>string.Join</code> and similar methods in EF query?</p>