title: LINQ Select and Convert Entites to ViewModels
body: <p>I am not new to Linq but for any reason i cant solve this problem.</p>
  
  <p>Lets say i have the following Models. Clearly this are sample models.</p>
  
  <pre><code>public class Parent
  {
      public int Id { get; set; }
      public List&lt;Child&gt; Children { get; set; }
      public DateTime CreateDate { get; set; }
  }
  
  public class Child
  {
      public int Id { get; set; }
      public List&lt;Toys&gt; Toys { get; set; }
      public DateTime CreateDate { get; set; }
  }
  
  public class Toys
  {
      public string Id { get; set; }
      public string Name { get; set; }
      public DateTime CreateDate { get; set; }
  }
  </code></pre>
  
  <p>What i want is to convert them into ViewModels. Here how my ViewModels are defined</p>
  
  <pre><code>public class ParentViewModel
  {
      public int Id { get; set; }
      public List&lt;ChildViewModel&gt; Children { get; set; }
  }
  
  public class ChildViewModel
  {
      public int Id { get; set; }
      public List&lt;ToysViewModel&gt; Toys { get; set; }
  }
  
  public class ToysViewModel
  {
      public string Id { get; set; }
      public string Name { get; set; }
  }
  </code></pre>
  
  <h3>My Problem</h3>
  
  <p>How can i select and convert my models into the viewModels. 
  Here is what i already have tried.</p>
  
  <pre><code>var q = from p in dbContext.Parents
          where p.Id = 123
          select new ParentViewModel
          {
             Id = p.Id,
             Children = ???
          };
  </code></pre>
  
  <p>How can get the List of Children and their Toys ? </p>
  
  <p>Thanks in advance!</p>