title: Check username and password in LINQ query
body: <p>this linq query</p>
  
  <pre><code>var users = from u in context.Users
              where u.UserEMailAdresses.Any(e1 =&gt; e1.EMailAddress == userEMail) &amp;&amp; u.UserPasswords.Any(e2 =&gt; e2.PasswordSaltedHash == passwordSaltedHash)
              select u;
  return users.Count();
  </code></pre>
  
  <p>returns: 1 even when there is nothing in password table.</p>
  
  <p>how come?</p>
  
  <p>what i am trying to do is get the values of email and passwordHash from two separate tables (<code>UserEMailAddresses</code> and <code>UserPasswords</code>) linked via foreign keys to the third table (<code>Users</code>).</p>
  
  <p><strong>it should be simple - checking if email and password mach from form to database. but it is not working for me.</strong></p>
  
  <p>i get 1 (for count) even when there are NO entries in the <code>UserPasswords</code> table.</p>
  
  <p>is the linq query above completely wrong, or...?</p>