I have an entity Test. It contains a Navaigation Property Question and Question contains a Navigation Property QuestionLocale.
var test = context.Tests
.Include("Question")
.FirstOrDefault();
works as expected. But how is it possible to include the QuestionLocale?
You can use:
var test = context.Tests
.Include("Question.QuestionLocale")
.FirstOrDefault();
You can do it in a strongly typed way too
var test = context.Tests
.Include(x => x.Question.Select(child => child.QuestionLocale))
.FirstOrDefault()