title: C# Linq2Sql GroupBy without Aggregate function
body: <p>I have the following table</p>
  <pre><code>Login  Permission
  user1      A      
  user1      B      
  user2      A      
  user2      B      
  </code></pre>
  <p>and I want to have the following output:</p>
  <pre><code>user1 A,B
  user2 A,B
  </code></pre>
  <p>to do so, I use the GroupBy method</p>
  <pre><code>var results = (from p in  _dbContext.Users
                 group p by new { p.Login } into g
                  select new { Login = g.Key.Login, 
                               Permissions = string.Join(&quot;,&quot;, g.Select(x =&gt; x.Permission)).ToList()
  </code></pre>
  <p>but without any aggregate function the given code fails. How to fix it ?</p>