title: LINQ to Entities does not recognize the method 'System.String ToString()' method
body: <pre><code>string[] userIds = userList.Split(','); // is an array of integers
  IList&lt;User&gt; users = (from user in this.repository.Users
                       where userIds.Contains(user.Id.ToString())
                       select user).ToList();
  </code></pre>
  
  <p>the above query gives</p>
  
  <p><code>System.NotSupportedException: LINQ to Entities does not recognize the method 'System.String ToString()' method, and this method cannot be translated into a store expression</code></p>
  
  <p>What can I do?</p>