title: How flatten a list with many arrays inside using LINQ
body: <p>I am finding this very hard to understand and where to start, so I was hoping that some one would be able to point in the correct direction. I have a list(customers) inside which there are arrays/lists. Basically I want to flatten all the results of the list into a flat version if the list.</p>
  
  <pre><code>public class Customer : EntityBase
  {
      public Phonenumber[]      PhoneNumbers            { get; set; }
      public Contact            BillToContact           { get; set; }
      public Terms              Terms                    { get; set; }
   }
  
   public class Contact
   {
      public Phonenumber[]        PhoneNumbers     { get; set; }
      public Address              Address          { get; set; }
      public Key                  Key              { get; set; }
      public string               CompanyName      { get; set; }
      public string               Email            { get; set; }
      public string               FirstName        { get; set; }
  }
  
  public class Phonenumber
  {
      public string               Number            { get; set; }
      public int                  Key               { get; set; }
  }
  
  public class Terms
  {
      public int      DueDays                       { get; set; }
      public int      DiscountDays                  { get; set; }
  }
  
  
  public class Address
  {
      public string               Address1                    { get; set; }
      public string               Address2                    { get; set; }
      public string               City                        { get; set; }
      public string               Country                     { get; set; }
  }
  
  public abstract class EntityBase
  {
      public Guid   Id          { get; set; }
      public string Status      { get; set; }
      public int    Rev         { get; set; }
  } 
  </code></pre>
  
  <p>I have tried many approaches and just keep getting more confused. So if anyone could help or even point me in the right direction I would be extremely grateful. below is one of the approaches I have tried.</p>
  
  <pre><code>public IEnumerable&lt;Customer&gt; Find (Func&lt;Customer , bool&gt; predicate) {
  
       foreach (var p in Customer.SelectMany(p =&gt; p)) {
               if(predicate(p)) {
               yield return p;
            }
         }
       }
  </code></pre>
  
  <p>I am Deserializing a jason string into a list but then want to display in a datagrid, but igGrid does not support binding to nested(complex) properties. So I need to flatten the list so that  there is no sub levels of the list. </p>