title: LinQ does not recognize the method 'int32 toint32'
body: <p>I have been searching in Google: <code>linq to entities does not recognize the method int32 toint32</code>. 
  I have this list in my database like <code>varchar</code>:</p>
  
  <blockquote>
    <p>1 , 2 , 3 , 4 , 5 , 6 , 7 .</p>
  </blockquote>
  
  <p>I need to order that list and get the max value. I'm using this but it doesn't work, I too saw other solutions here, but nothing works. This is my query:</p>
  
  <pre><code>var query= dbcontext.NV_Users.OrderBy(p =&gt; Convert.ToUInt32(p.code)).ToList().Max();
  </code></pre>
  
  <p>And I was trying with a normal query, also not working:</p>
  
  <pre><code>var query= from _NV_Field in dbcontext.NV_Users
             orderby Convert.ToInt32(_NV_Field.code) ascending
             select _NV_Field.code;
  </code></pre>
  
  <p>Before asking here , I've been searching Google like a crazy.</p>