title: Possible to pass in a generic entity and access a common property?
body: <p>I want to have a method that checks some AccountIDs are allowed for a certain operations and in doing so, I need to get a distinct list of AccountIDs in any entity type that I pass through.  </p>
  
  <p>I could have a User entity, a Transaction entity, and Product entity, etc. but they will all always have an AccountID property no matter what.</p>
  
  <p>This is some non-working code to hopefully give you the gist of what I'm trying to accomplish...</p>
  
  <pre><code>public void CheckForAccountAuthorization&lt;T&gt;(IQueryable&lt;T&gt; entityWithAccountIdProperty)
  {
      IEnumerable&lt;string&gt; accountIdList 
          = entityWithAccountIdProperty.Select(u =&gt; u.AccountID).Distinct();
  
      //Do More Work...
  
      }
  }
  </code></pre>
  
  <p>But it gives me the errors:</p>
  
  <blockquote>
    <p>Unknown method 'Select(?)' of 'System.Linq.IQueryable'</p>
    
    <p>Unknown member 'AccountID' of 'T'</p>
  </blockquote>