title: Convert int to string in linq to entities on join clause
body: <p>I'm trying to join two tables comparing a column of type int with a column of type varchar,  but no mather what I try I get some conversion error...</p>
  
  <pre><code>using (Ginkgo5Entities dataContext = new Ginkgo5Entities())
  {
      var x = (
          from node in dataContext.new_users_teams
              join udata in dataContext.new_users_data
                  on new {
                      x = SqlFunctions.StringConvert((double)node.ID),
                      y = "team" }
                  equals new {
                      x = udata.value,
                      y = udata.key }
          from parent in dataContext.new_users_teams
              where node.lft &gt;= parent.lft &amp;&amp; node.lft &lt;= parent.rgt &amp;&amp; parent.ID == 6
          select new {
              team = node.team_name
              // udata = udata }
      ).ToList();
  }
  </code></pre>
  
  <p>This throws</p>
  
  <p>"{The specified method 'System.String StringConvert(System.Nullable`1[System.Double])' on the type 'System.Data.Objects.SqlClient.SqlFunctions' cannot be translated into a LINQ to Entities store expression.}"</p>
  
  <p>QUESTIONS:</p>
  
  <ol>
  <li>Is it even possible what I'm trying? If so.. can anyone help</li>
  <li>I this a bad practice?</li>
  </ol>
  
  <p>Thank you very much!</p>