Eager Loading Deeply into a Model with a Collection Property Whose Type is Inherited
The problem here is that you'd actually want to include subtypes. If Job had a collection of Pdfs, you could have done


Job job = await db.Jobs
                  .Include(j =&gt; j.Pdfs.Select(pdf =&gt; pdf.PdfPages))
                  .SingleOrDefaultAsync(j =&gt; j.Id == id);



But Pdf is a subtype, and EF doesn't support a syntax like


Job job = await db.Jobs
                  .Include(j =&gt; j.Files.OfType&lt;Pdf&gt;().Select(pdf =&gt; pdf.PdfPages))
                  .SingleOrDefaultAsync(j =&gt; j.Id == id);



So what you do is the only way to get the Job with Pdfs and PdfPages.

There are some improvements to be made though:


You can just load the child objects into the context without assigning them to job.Files yourself. EF will knit the entities together by relationship fixup.
You can first check if the Job is found and then load the Pdfs.


Turning it into this:

Job job = await db.Jobs.FindAsync(id);
if (job == null)
{
    return NotFound();
}
else
{
    // Load the PDFs for this job and include their PdfPages
    await db.Pdfs.Include(pdf =&gt; pdf.PdfPages).Where(pdf =&gt; pdf.Job_ID == id)
        .LoadAsync();
}

return Ok(job);