title: Entity code first issue where a field is null
body: <p>To demonstrate the issue I have the following code first db context. Don't worry about the model, it doesn't make sense conceptually as it is just to demonstrate the issue.</p>
  
  <pre><code>public class SubjectsDbContext : DbContext
  {
      public virtual DbSet&lt;Subject&gt; Subjects { get; set; }
  
      public SubjectsDbContext(string connectionString) : base(connectionString)
      {
      }
  
      public SubjectsDbContext()
      {
  
      }
  }
  
  public class Subject
  {
      [Key]
      [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
      public Guid SubjectId { get; set; }
  
      [Required]
      public virtual Course EnrolledCourse {get;set;}
  
      [Required]
      [Column(TypeName = "varchar")]
      [StringLength(64)]
      public string FullName { get; set; }
  }
  
  [Table("Courses")]
  public class Course
  {
      [Key]
      [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
      public Guid CourseId { get; set; }
  
      [Required]
      public string CourseName { get; set; }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I can create new entries ok and the data goes into the db correctly as expected.</p>
  
  <p>However if I try to retrieve the Subjects by</p>
  
  <pre><code>dbContext.Subjects
  </code></pre>
  
  <p>I get a list correctly, but when I access the Subject object</p>
  
  <pre><code>dbContext.Subjects.First()
  </code></pre>
  
  <p>the Course member field is null. What is the issue?</p>
  
  <p>In the debugger I get this error</p>
  
  <blockquote>
    <p>((System.Data.Entity.DynamicProxies.Subject_6FCD2FAC29425D72CDE4D879DA7F242F07267C22C94FFE2051F99B13F76C6637)subject).EnrolledCourse' threw an exception of type 'System.Data.Entity.Core.EntityCommandExecutionException</p>
  </blockquote>