title: how to convert int to string in Linq to entities
body: <p>My Db column in a string (varchar) and i need to assign it to a int value.
  I am using linq to query.Though the code compiles am getting an error at the run time .
  Thanks in advance.</p>
  
  <p>PFB my query :</p>
  
  <pre><code>var vlauesCap = from plan in entities.PA_RTM_CAP_Group
                  select new Business.PartnerProfile.LookUp
                  {
                   Id =Convert.ToInt32(plan.cap_group_code),
                   //(Int32)plan.cap_group_code,
                   Value = plan.cap_group_name
                        };
                     return vlauesCap.ToList();
  </code></pre>