title: Cannot convert string to int32 LINQ
body: <p>I have code like this:</p>
  
  <pre><code>foreach (DataRow row in tmpDatosModulos.Rows)
                  {
                      tmpBSCID += row["ModuloURL"].ToString();
                      tmpBSCID = tmpBSCID.Replace("../BSC/wf_BSC_Reporte.aspx?BSCID=", "");
                  }
  
   bsc = _c.ConfiguracionesBalance.Where(x =&gt; x.mdEstatusRegistro &amp;&amp; x.sEstatus.Equals("A") &amp;&amp; x.ID == int.Parse(tmpBSCID)).ToList();
  </code></pre>
  
  <p>I get error when I debbug it:</p>
  
  <blockquote>
    <p>LINQ to Entities does not recognize the method 'Int32
    Parse(System.String)' method, and this method cannot be translated
    into a store expression.</p>
  </blockquote>
  
  <p>I read another questions about that, and solution explained is to parse outside LINQ expression so I do something like this:</p>
  
  <pre><code>foreach (DataRow row in tmpDatosModulos.Rows)
                  {
                      tmpBSCID += row["ModuloURL"].ToString();
                      tmpBSCID = tmpBSCID.Replace("../BSC/wf_BSC_Reporte.aspx?BSCID=", "");
                  }
     tmpBSCID = int.Parse(tmpBSCID);
  bsc = _c.ConfiguracionesBalance.Where(x =&gt; x.mdEstatusRegistro &amp;&amp; x.sEstatus.Equals("A") &amp;&amp; x.ID == tmpBSCID).ToList();
  </code></pre>
  
  <p>but I get </p>
  
  <blockquote>
    <p>Cannot implicity convert int to string</p>
  </blockquote>
  
  <p>in this line <code>tmpBSCID = int.Parse(tmpBSCID);</code></p>
  
  <p>It's a little confussing because I'm converting string to int and no viceversa. Regards</p>