Error when using "Include" method on a LINQ Query
<p>In my following LINQ Query in an ASP.NET MVC Core project, I'm getting the following error <code>Unable to cast object of type 'System.Linq.Expressions.NewExpression' to type 'System.Linq.Expressions.MemberExpression'</code>. The error occurs on the last line of the code below:</p>

<pre><code>public async Task&lt;IActionResult&gt; Index()
{
    var qry = from b in _context.Blogs
                join p in _context.Posts on b.BlogId equals p.BlogId into bp
                from c in bp.DefaultIfEmpty()
                select new { b.BlogId, b.Url, c.Title, c.Content, c.Blog };
    var bloggingContext = qry.Include(p =&gt; p.Blog);
    return View(await bloggingContext.ToListAsync());
}
</code></pre>

<p><strong>Model</strong>: From this <a href="https://docs.efproject.net/en/latest/platforms/aspnetcore/new-db.html#create-your-model" rel="nofollow">official ASP.NET tutorial</a>.</p>

<pre><code>namespace ASP_Core_Blogs.Models
{
    public class BloggingContext : DbContext
    {
        public BloggingContext(DbContextOptions&lt;BloggingContext&gt; options)
            : base(options)
        { }

        public DbSet&lt;Blog&gt; Blogs { get; set; }
        public DbSet&lt;Post&gt; Posts { get; set; }
    }

    public class Blog
    {
        public int BlogId { get; set; }
        public string Url { get; set; }

        public List&lt;Post&gt; Posts { get; set; }
    }

    public class Post
    {
        public int PostId { get; set; }
        public string Title { get; set; }
        public string Content { get; set; }

        public int BlogId { get; set; }
        public Blog Blog { get; set; }
    }
}
</code></pre>