title: Entity framework, code first. Child objects not populating when called
body: <p>I'm getting to grips with EF code first. My domain model design doesn't seem to support the auto 'populating' child of objects when I call them in code. </p>
  
  <p><strong>Model:</strong></p>
  
  <pre><code>public class Car
  {
      [Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
      public int Id { get; set; }
  
      [Required,MaxLength(10)]
      public string Registration { get; set; }
  
      [MaxLength(30)]
      public string Make { get; set; }
  
      [MaxLength(45)]
      public string Model { get; set; }
  
      [Required]
      public Coordinates Coordinates { get; set; }
  
      [Required]
      public Client Client { get; set; }                    
  }
  
  public class Coordinates
  {
      [Key, ForeignKey("Car")]
      public int Id { get; set; }
  
      public double Latitude { get; set; }
  
      public double Longitude { get; set; }
  
      [Required]
      public Car Car { get; set; }
  }
  </code></pre>
  
  <p>For example, I simply call:</p>
  
  <pre><code>public List&lt;Car&gt; Get()
  {            
      var cars = _context.Cars.ToList();
      return cars;
  }
  </code></pre>
  
  <p>And my object contains all the <code>Cars</code> from the database, but doesn't include the <code>Coordinates</code>. The database seed created the data correctly, but I can't get EF to automatically reference <code>Coordinates</code>, or <code>Client</code> for that matter. But I suspect once we solve one, it'll resolve the other. </p>
  
  <p>What am I doing wrong, have I misunderstood how to do this?</p>