title: EF - context.Set<t> vs context.T
body: <p>Since month, I'am wondering what is the difference using <strong>context.Set vs context.T</strong> instead of syntax.</p>
  
  <p>I illustrate this question with this quick code that tries to get UserName from User table information from EF context. </p>
  
  <p><strong>context.Set Method</strong></p>
  
  <pre><code>context.Set&lt;User&gt;().Where(u =&gt; u.Id = userId).Select(u =&gt; u.UserName).Single();
  </code></pre>
  
  <p><strong>context.T Method</strong></p>
  
  <pre><code> context.Users.Where(u =&gt; u.Id = userId).Select(u =&gt; u.UserName).Single();
  </code></pre>
  
  <p>Thanks :)</p>