title: Entity Framework: String concat in database query
body: <p>I need to create a string concatenation with an linq statement. I have the following data:</p>
  
  <p><strong>Section</strong></p>
  
  <ul>
  <li>Id: 1, Title: Test1</li>
  <li>Id: 2, Title: Test2</li>
  </ul>
  
  <p><strong>Section_User</strong></p>
  
  <ul>
  <li>SectionId: 1, UserId: 1</li>
  <li>SectionId: 1, UserId: 2</li>
  </ul>
  
  <p><strong>Users</strong></p>
  
  <ul>
  <li>Id: 1, Name: User1</li>
  <li>Id: 2, Name: User2</li>
  </ul>
  
  <p><strong>I need the following result:</strong></p>
  
  <p>SectionId: 1, Users: User1, User2</p>
  
  <p>I create the following Linq statement:</p>
  
  <pre><code>var query2 =    from section in this.context.Sections
                  from users in section.Users
                  group section by section2.Id into groupedSection
                  select new {
                      SectionId = groupedSection.Key,
                      Users = string.Join(",", users.Select (x =&gt; x.Name)) // compile error, but I don't know how I write the statement correctly
                  };
  </code></pre>
  
  <p>Could someone tell me, how I can create a string concatenation on database side (not in-memory) with an linq statement.</p>
  
  <p>Thanks!!</p>