title: What's wrong with this lambda expression? "u => ... && u => ..."
body: <p>I am trying to use logical operators in the following lambda expression</p>
  
  <pre><code>int count = dataContext.Users.Count(u =&gt; u.ID == 1 &amp;&amp; u.Name == "name");
  </code></pre>
  
  <p>below is the complete function</p>
  
  <pre><code>private void Login(int id, string password)
  {
      MyDataContext dataContext = new MyDataContext();
      int count = dataContext.Users.Count(u =&gt; u.ID == 1 &amp;&amp; u.Name == "name");
  }
  </code></pre>
  
  <p>I'm using Microsoft SQL Server 2008 Express 2008 Edition and User table looks like</p>
  
  <pre><code>ID int autogenerated
  Name string
  </code></pre>
  
  <p>but Visual Studio 2010 gives the following design time errors "Invalid expression terms". Any idea what I might be doing wrong?</p>
  
  <p>I get the following error messages</p>
  
  <ul>
  <li>Error 2   ) expected  ...\FormAdd.cs  105 123 </li>
  <li>Error 3   ; expected  ...\FormAdd.cs  105 126 </li>
  <li>Error 5   ; expected  ...\FormAdd.cs  105 158</li>
  <li>Error 7   ; expected  ...\FormAdd.cs  105 202</li>
  <li>Error 4   Invalid expression term   ')'   ...\FormAdd.cs  105 158</li>
  <li>Error 6   Invalid expression term   ')'   ...\FormAdd.cs  105 202 </li>
  <li>Error 1   Invalid expression term   '=>'  ...\FormAdd.cs  105 123</li>
  </ul>
  
  <p><img src="https://i.stack.imgur.com/LDwZ6.png" alt="Intellisense doesn&#39;t show user object properties"></p>
  
  <p><img src="https://i.stack.imgur.com/aQjXe.png" alt="List of Errors"></p>