title: IEnumerable<> to IList<>
body: <p>I am using Linq to query my database and returning a generic IList.</p>
  
  <p>Whatever I tried I couldn't convert an IQueryable to an IList.</p>
  
  <p>Here is my code.</p>
  
  <p>I cannot write simpler than this and I don't understand why it is not working.</p>
  
  <pre><code>public  IList&lt;IRegion&gt; GetRegionList(string countryCode)
  {
      var query = from c in Database.RegionDataSource
                  where (c.CountryCode == countryCode)
                  orderby c.Name
                 select new {c.RegionCode, c.RegionName}; 
  
       return query.Cast&lt;IRegion&gt;().ToList(); 
  }
  </code></pre>
  
  <p>This returns an list with the right number of items but they are all empty
  Please help, I am bloqued with this for a couple of days now</p>