title: Why do LINQ to Entities does not recognize certain Methods?
body: <p>Why cant I do this:</p>
  
  <pre><code>usuariosEntities usersDB = new usuariosEntities();      
  foreach (DataGridViewRow user in dgvUsuarios.Rows)
  {
     var rowtoupdate = 
         usersDB.usuarios.Where(
         u =&gt; u.codigo_usuario == Convert.ToInt32(user.Cells[0].Value)
         ).First();
     rowtoupdate.password = user.Cells[3].Value.ToString();
  }
  usersDB.SaveChanges();
  </code></pre>
  
  <p>And have to do this:</p>
  
  <pre><code>usuariosEntities usersDB = new usuariosEntities();      
  foreach (DataGridViewRow user in dgvUsuarios.Rows)
  {
     int usercode = Convert.ToInt32(user.Cells[0].Value);
     var rowtoupdate = 
         usersDB.usuarios.Where(u =&gt; u.codigo_usuario == usercode).First();
     rowtoupdate.password = user.Cells[3].Value.ToString();
  }
  usersDB.SaveChanges();
  </code></pre>
  
  <p>I must admit it is a more readable code but why cant this be done?</p>