title: LINQ to Entities: query example
body: <p>Can someone show me how to get a user's usergroup relation in LINQ to Entities <a href="http://pascalc.nougen.com/stuffs/aspnet_linq_model.png" rel="nofollow">from this model</a>?</p>
  
  <p>I need get a list to be able to loop it after ward in such way:</p>
  
  <pre><code>foreach (QASModel.UserGroup usergroup in ...)
  </code></pre>
  
  <p>Bonus points if you can provide some examples on how to :</p>
  
  <ul>
  <li>get a user's role permission "path" based on the user ID</li>
  <li>get a user's role  based on it's ID</li>
  <li>get a all user(s) of a specific role based on the role ID
  that would also help.</li>
  </ul>