title: Entity Framework Load Property of Child
body: <p>I have the following structure:</p>
  
  <pre><code>public class A{}
  
  public Class B:A
  {
      public virtual C { get; set;}
  }
  
  public Class C{}
  
  public Class Context:DbContext
  {
      public DbSet&lt;A&gt; As { get; set; }
      public DbSet&lt;C&gt; Cs { get; set; }
  }
  </code></pre>
  
  <p>When I want to load any object <code>b</code>, the property <code>C</code> of this object is null. In the database the column C has an id in the table for <code>A</code>. Other <code>int</code> or <code>string</code> properties can be loaded without a problem.</p>
  
  <pre><code>using(var ctx = new Context())
  {
      B b = ctx.As.FirstOrDefault() as B;
  }
  </code></pre>
  
  <p>Can I solve this problem using lazy loading? Using Eagerly Loading I have a problem to include the property <code>B</code>, because I have a list <code>List&lt;A&gt; someAs</code> where some of the items are from type <code>B</code>.</p>
  
  <p>I tried to keep this example as simple as possible. Just tell me to provide more information.</p>