It is clear how to query an entity and include all the related data; e.g.:
using (var context = new BloggingContext())
{
var blogs = context.Blogs
.Include(blog => blog.Posts)
.Include(blog => blog.Owner)
.ToList();
}
My question is, given an entity that is missing some related data, how I can ask EF to fetch its related data from DB?
For instance:
var blog = context.Blogs.Find(1); // get the blog with ID=1
// how can I do something like:
blog.Include(x => x.Posts);