title: Entity Framework 4 - List<T> Order By based on T's children's property
body: <p>I have the following code -</p>
  
  <pre><code> public void LoadAllContacts()
          {
              var db = new ContextDB();
              var contacts = db.LocalContacts.ToList();
              grdItems.DataSource = contacts.OrderBy(x =&gt; x.Areas.OrderBy(y =&gt; y.Name));
              grdItems.DataBind();
          }
  </code></pre>
  
  <p>I'm trying to sort the list of the contacts according to the area name that is contained within each contact. When I tried the above, I get "At least one object must implement IComparable.". Is there an easy way instead of writing a custom IComparer?</p>
  
  <p>Thanks!</p>