title: 'Order by' ignored in LINQ query
body: <p>I am trying to sort a list by company name. I have tried the following code but this sorts the list by CompID and not CoShort. How should I change this to sort by CoShort?</p>
  
  <pre><code>Public Shared Function [SelectCompanyData](iElement() As Integer) As List(Of CompanyList)
  
      Dim db As New EntryDataContext()
  
      Dim q As IQueryable(Of CompanyList) = (From Act_Sub_Manfu_Link In db.Act_Sub_Manfu_Links _
              Join Company In db.Companies _
              On Act_Sub_Manfu_Link.CompID Equals Company.CompID _
              Where iElement.Contains(Act_Sub_Manfu_Link.ACCN) _
              And Company.In_Dir _
              Select New CompanyList With { _
                  .CompID = Company.CompID, _
                  .InDir = Company.In_Dir, _
                  .CoShort = Company.CoShort _
                  }).Distinct
  
      q.OrderBy(Function(c) c.CoShort)
  
      Dim list As List(Of CompanyList) = q.ToList
  
      Return list
  
  End Function
  </code></pre>