title: linq-To-Sql: filter with enum(flags)
body: <p>I have a enum:</p>
  
  <pre><code>[Flags]
  public enum EmailType
  {
      PasswordRecovery = 1,
      Activation = 2,
      SendTicket = 4
  }
  </code></pre>
  
  <p>For example, in a table we have value equals 3 that means - <code>PasswordRecovery</code>, <code>Activation</code>.
  This is my query:</p>
  
  <pre><code>var emailType = EmailType.PasswordRecovery;
  return Database.EmailSettings.FirstOrDefault(es =&gt; es.EmailType ==  (int)emailType);
  </code></pre>
  
  <p>Of course this query not works properly:<code>3 == 1 =&gt; false</code>.
  How to filter properly?<br>
  Thanks.</p>
  
  <p><strong>UPDATE:</strong>
  I'm using <code>Flags</code> attribute because there is one more application written with XAF (devexpress framework) and I have one feature in UI that required <code>Flags</code> attribute.</p>