title: mvc orderby<.IorderedEnumerable> error
body: <p>MVC beginner.
  In implementing a solution from another post, I now have a different problem. I understand the gist of the problem, but do not understand how to fix it.</p>
  
  <p>I've changed a sort to a groupby:</p>
  
  <pre><code>ViewModel.Lots = from x in (db.Subdivisions.SelectMany(sd =&gt; sd.Lots))
  group x by x.Num_of_steps == 0 ? 3 : x.Num_of_steps &lt; 115 ? 1 : 2 into g
  orderby g.Key
  select g.OrderBy(g1 =&gt; g1.LotName);
  </code></pre>
  
  <p>I now get this error:</p>
  
  <blockquote>
    <p>Cannot implicitly convert type 'System.Linq.IQueryable&lt;System.Linq.IOrderedEnumerable&lt;MVCBSV.Models.Lot>>' to 'System.Collections.Generic.IEnumerable&lt;MVCBSV.Models.Lot>'. An explicit conversion exists (are you missing a cast?)</p>
  </blockquote>
  
  <p>After reading several posts I've made some changes such as:</p>
  
  <pre><code>  select g.OrderBy(g1 =&gt; g1.LotName).AsQueryable().ToList()
  </code></pre>
  
  <p>In this case the message changes to:</p>
  
  <blockquote>
    <p>Cannot implicitly convert type 'System.Linq.IQueryable&lt;System.Collections.Generic.List&lt;MVCBSV.Models.Lot>>' to 'System.Collections.Generic.IEnumerable&lt;MVCBSV.Models.Lot>'. An explicit conversion exists (are you missing a cast?)  </p>
  </blockquote>
  
  <p>Can someone help- and explain why they did, where they did it so I can understand.
  Thanks</p>