title: LINQ lambda - convert int to string
body: <p>i'm trying to compare a int with a string in the join method of linq lambda, like this:</p>
  
  <pre><code>database.booking.Join(database.address,
                        book =&gt; book.bookno,
                        afh =&gt; afh.addressid.ToString(),
                         (book, afh) =&gt; new { booking = book, add = afh })
                  .Where(book =&gt; book.address.name == "test");
  </code></pre>
  
  <p>but i'm getting an error on the ToString():</p>
  
  <blockquote>
    <p>System.NotSupportedException: LINQ to Entities does not recognize the method 'Int32 ToInt32(System.String)' method, and this method cannot be translated into a store expression.</p>
  </blockquote>
  
  <p>How do i solve this?</p>