views:

2131

answers:

1

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?

+10  A: 

You can use do:


var test = context.Tests
                  .Include("Question.QuestionLocale")
                  .FirstOrDefault();

Klinger